PHP run as Apache Module (mod_php)
Add this to your root .htaccess file. Say your php.ini is in folder /askapache.com/ini/
SetEnv PHPRC /askapache.com/ini
SetEnv PHPRC /askapache.com/ini
# 1 YEAR
Header set Cache-Control "max-age=29030400, public"
# 1 WEEK
Header set Cache-Control "max-age=604800, public"
# 2 DAYS
Header set Cache-Control "max-age=172800, proxy-revalidate"
# 1 MIN
Header set Cache-Control "max-age=60, private, proxy-revalidate"
# any Expires Directives go here
# any Header directives go here
At least one of the 2 modules needs to be built into Apache; although they are included in the distribution, they are not turned on by default. To find out if the modules are enabled in your server, find the httpd binary and run httpd -l; this should print a list of the available modules. The modules we're looking for are mod_expires and mod_headers.
If they aren't available, and you have administrative access, you can recompile Apache to include them. This can be done either by uncommenting the appropriate lines in the Configuration file, or using the -enable-module=expires and -enable-module=headers arguments to configure (1.3 or greater).
Complete ArticleIn a new post on 'Making the Web blog', there's a new post that talks about preparing your code for PHP6 when it comes around. "If you want to make use of PHP 6 when it comes, you're going to have to write your new scripts so they are compatible, and possibly change some of your existing scripts. To start making your scripts PHP 6 compatible, I've compiled a list of tips to follow when scripting." The list of tips has five entries:
By Justin Silverton
The following javascript code will allow you to add keyboard shortcuts to any webpage.
The code
(put this on any page where you want keyboard shortcuts)
I can't put the HTML code please refer:- Html Code
(put this in a file called shortcut.js and upload to the same directory as the webpage with the above code). This example will display an alert message when the escape key is pressed.
function keyShortcut() {
var e = window.event;
var code = e.keyCode;
if (code == 112) { //checks for the escape key
alert('escape key pressed');
}
}
The following are some more keyboard codes that can be used within the above script (in the if code == X, where X is one of the codes below).
| key | Code |
| tab | 9 |
| enter | 13 |
| leftwindow key | 91 |
| right window key | 92 |
| f1 | 112 |
| f2 | 113 |
| f3 | 114 |
| f4 | 115 |
| f5 | 116 |
| f6 | 117 |
| f7 | 118 |
| f8 | 119 |
| f9 | 120 |
| f10 | 121 |
| f11 | 122 |
| f12 | 123 |