05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Once button.php is installed, when a request comes in for something like http://<br />

your.site/buttons/php.png, the web server checks whether the buttons/php.png file<br />

exists. If it does not, the request is redirected to our button.php script, which creates<br />

the image (with the text “php”) and saves it to buttons/php.png. Any subsequent<br />

requests for this file are served up directly without a line of <strong>PHP</strong> being run.<br />

Example 9-9. More efficient caching of dynamic buttons<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!