The simple way to prevent image caching is to append time stamp with the name on image.
Ex-<img src=’image.jpg?<?php echo time() ?>’ />
In the above code browser understand a new image at every call. But HTML parser understands “image.jpg” for every call.
Article written by admin
Using HTML meta tags: we can prevent Web browsers caching.
<meta http-equiv="Expires" content="Sun, 20 Fed 2000 01:11:11 GMT"
/>
<meta http-equiv="Pragma" content="no-cache" />
Here Meta tag tells the browser, cached copy of the page in back date.That means browser should never cache the page.
But some browser does not support this approach .If you are working with php and include the header that has Meta definition.
For this case, use php Header function to produce the two meta tags above
<?php
header('Expires: Sun, 20 Fed 2000 01:11:11 GMT');
header('Pragma: no-cache');
?>
Or use
<?php
header('Expires: Sun, 20 Fed 2000 01:11:11 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
?>
In this case visitor will always see the latest contents.
Article written by admin
<script>
function doSubmit()
{
var frm = window.document.frmName;
frm.action="path to php file";
frm.method = post;
frm.submit();
}
</script>
Article written by urooj
You can call the phpinfo() function to find the location of
your php.ini file, it will also tell you the current values
for the following settings that we need to modify
1.file_uploads
2.upload_max_filesize
3.max_input_time
4.memory_limit
5.max_execution_time
6.post_max_size
Article written by urooj
Default session time in PHP is 1440 seconds. if we want to
change the session time in php, then we have to change in
php.ini.
Article written by urooj
using ini_set(’memory_limit’,'15M’); // now 15M space is set during run time.
Article written by admin
Using string ini_set ( string $varname , string $newvalue ).
you can change
Article written by admin
To increase the execution time for any php script simple use below code.
ini_set(‘max_execution_time’, 240); //240seconds = 4 minutes
Article written by admin
Ans: Following two of the most important recent changes that affect old code are:
The deprecation of the old $HTTP_*_VARS arrays (which need to be indicated as global when used inside a function or method). The following superglobal arrays were introduced in PHP » 4.1.0. They are: $_GET, $_POST, $_COOKIE, $_SERVER, $_FILES, $_ENV, $_REQUEST, and $_SESSION. The older $HTTP_*_VARS arrays, such as $HTTP_POST_VARS, still exist as they have since PHP 3. As of PHP 5.0.0, the long PHP predefined variable arrays may be disabled with the register_long_arrays directive.
Article written by admin
Ans: If we used the method GET then our form information would live in the $_GET superglobal instead.
You may also use the $_REQUEST superglobal. if you do not care about the source of your request data. It contains the merged information of GET, POST and COOKIE data.
Article written by admin