demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter.

featured articles

popular favourites

How Do I Know If My Web Server Supports PHP?

PHPInfo Response PageThere is a quick and simple test. Create a new page, one completely free of code of any kind, with the filename test.php (the actual name of the file is immaterial, so long as it follows standard web naming conventions and has a .php suffix). On this page, write a single line of PHP code:

  1. <?php phpInfo(); ?>

Then upload or place the page in the appropriate directory on your server and use your web browser to navigate to the page.

If the server is running PHP, what you will see may surprise you: a huge presentation of data pulled live from the server regarding PHP, Apache, and associated modules. While very simple, this also demonstrates how powerful server-side languages can be: a single function can generate an incredible amount of content.

To extend this lesson, take a look at the source code of the generated page (CTRL-U/CMD-U in most browsers). Note that you do not see any trace of PHP code; you only see the HTML and CSS generated by PHP. The browser never directly interacts with PHP; it only receives its output, expressed as HTML, CSS, JavaScript or images.

You must be signed up in order to leave comments.

web developer guide

featured comment

by Aisling Brock in New Business Card Design

what i'm reading

A Feast for Crows: A Song of Ice and Fire: Book Four
A Feast for Crows: A Song of Ice and Fire: Book Four

what i'm watching

Prometheus: Collector's Edition (Bilingual) [Blu-ray 3D + Blu-ray + DVD + Digital Copy]
Prometheus: Collector's Edition (Bilingual) [Blu-ray 3D + Blu-ray + DVD + Digital Copy]

what i'm playing

Borderlands
Borderlands

what i'm hearing

Planets
Planets

blogs

podcasts

no ads ever

This blog is free of advertising, and always will be.

creative commons licensed

The content of this blog is free to use in whatever way you wish under the Creative Commons license.