For more details for sending mail with example visit http://wiki.dreamhost.com/PHP_mail()
Create thumbnail images ....click here
http://webcheatsheet.com/php/create_thumbnail_images.php
How a PHP session works?
PHP session cookie set in clients browser,
every request send by client to server stores in a browser by default using session_start()
.we can store cookies in a database.
Create thumbnail images ....click here
http://webcheatsheet.com/php/create_thumbnail_images.php
How a PHP session works?
PHP session cookie set in clients browser,
every request send by client to server stores in a browser by default using session_start()
.we can store cookies in a database.
Can I generate a PDF file with PHP?
In order to create a .pdf file using php code there are few things to be done before you generate the code.
First of all you should know that using just a php code is not enought for the pdf file to be generated. You should download a package from the official download page for the package “fpdf”.
You can do that by simply going on the download page via the following URL:
You can do that by simply going on the download page via the following URL:
http://www.fpdf.org/en/download.php
There you should download the latest version of the package. The contents of that package are some tutorials on how you can use it and also installation instructions for your convenience.
There you should download the latest version of the package. The contents of that package are some tutorials on how you can use it and also installation instructions for your convenience.
After uploading this package to the folder in which you will execute the code of the php file you should create the .php file with the following code for example:
<?php
require(‘fpdf.php‘); //includes the package you have uploaded
require(‘fpdf.php‘); //includes the package you have uploaded
$pdf=new FPDF(); // creates new instance of the fpdf class
$pdf->AddPage(); // creates a new instance of pdf page
$pdf->SetFont(‘Arial‘,’B‘,16); // Set the font for the text
$pdf->Cell(40,10,’Hello World!‘); / The actual text. You should simply change Hellow World! With the text you need to add.
$pdf->Output(); //Generates the output of the above code.
$pdf->AddPage(); // creates a new instance of pdf page
$pdf->SetFont(‘Arial‘,’B‘,16); // Set the font for the text
$pdf->Cell(40,10,’Hello World!‘); / The actual text. You should simply change Hellow World! With the text you need to add.
$pdf->Output(); //Generates the output of the above code.
?>
You should note that the above provided code will automatically generate a pdf file with the content provided in the $pdf->Cell() finction.
Creating redirects in PHP and HTML
In order to create a PhP redirect you should insert into the code of the .php file (somefile.php) from which you want the user to be redirected the following line:
<?php
header(‘Location: http://domain.com/folder/file.php’);
?>
?>
In this structure there are few things to be explained.
First of all the “header” is a base function in the php programming language. The parametter given to that function (Location: http://domain.com/folder/file.php) consist of two parts. The first part is the actual word location which start the statement for the location of the redirection. The second part is a web-adress which also might be a simple file (file.php). Note that in case it is a file the redirection will be made on local level.
In order to create an HTML redirect you should insert the following line into an .html file (somefile.html) from which you want to redirect the incoming requests:
<meta http-equiv=”Refresh” content=”5; url=http://domain.com/folder/file.html“>
This structure present an html code which will redirect all incomming requests to the specific location given in the content directive. Also these requests will be redirected 5
seconds when they reach the file containing the above html code. Note that the value 5 can be changed depending on the time interval for which you want to redirect the incomming requests.12.
for more details visit http://www.tmdhosting.com/kb/category/technical-questions/php-related-questions/seconds when they reach the file containing the above html code. Note that the value 5 can be changed depending on the time interval for which you want to redirect the incomming requests.12.
Is there any way to change the value of a PHP setting?
In order to change speciffic settings in the global php.ini configuration file you should first be aware that such changes are not allowed on our shared hosting environment due the fact that these are global changes which will affect all of the users which are located ont he same server as you are.
However there is an option which you should consider. Into your public_html folder usually is located a file called .htaccess. You can insert in it the settings you need for your web-site and they will be considered on local level. In other words these settings will affect only your web-site and not other users.
As for our dedicated services users (VPS/Dedicated server ) if they have the root password they can edit their global php.ini file without any issues due the fact that they are using services which does not involves shared hosting environment with other users and such changes wont affect the other users.
0 comments:
Post a Comment
Thanks for your valuable feedback