Friday, 22 April 2011

Configuration directives related to the file uploads



Configuration directives related to the file uploads:
i)              file_uploads: By using this directive we can allow and stop the file uploads.
ii)           Upload_tmp_dir: This configuration directive is used to provide the location of temporary directory to upload the files.
iii)          Upload_max_filesize: This configuration directive is used to provide the maximum file size to upload.

Types of errors at the time of file uploading
  1. If the file size is maximum than upload_max_filesize it retunes 1..
  2. If the file size is maximum than browsers configuration settings value then the output is 2.
  3. If there is any network problem, at the time of file upload the output is 3.
  4. If user click on the submit button without selecting any file then it returns 4.

Super Global Variables "$_cookie"

$_cookie: By using this super global variable you can get the values of cookies.
setcookie: By using this function we can create the cookies.
Page1.php
<?php
setcookie("city","hyd", time()+3600);
echo "cookie is created";
echo $_COOKIE['city'];
?>
<a href="page2.php">not</a>
Page2.php
<?php
echo "welcome to PHP";
echo "value is".$_COOKIE['city'];
?>

The cookies was created to see the cookie select <tools> and in that <internet option > browsing history<settings> view files.
In that tab you can see the cookies you created.

0 comments:

Post a Comment