oh boy ...
First, running php on your system in reality does not require a webserver (and no, your system is not a webserver; IIS or Apache are webservers).
Just because some title says "APACHE 2.2.11..., PHP5.2.8..., ..." does not say Apache is installed.
If you think you have installed Apache, you can prove it run->services.msc
look for Apache2 in the list of services
You can make it Autostart or use a manual start usingrun->net start apache2
from an admin account
If you install PHP at C:\PHP the the executable is \PHP\php.exe and php5apache2.dll
is what the Apache configuration needs to use.
In the Apache config you need
Code:
##### PHP hook ######
# For PHP 5 do something like this:
LoadModule php5_module "C:/PHP/php5apache2.dll"
#AddType application/x-httpd-php .php .phtml
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php .phtml
# For PHP 5
Action application/x-httpd-php "C:/PHP/php-cgi.exe"
# configure the path to php.ini
PHPIniDir "C:\PHP"
ScriptAlias /PHP "C:/PHP/usrscripts/"
THEN, your php scripts should use xxx.phtml if you want dynamic page generation as in your examples OR
use xxx.php if you need a cgi script to process forms data
(and it then belongs in \Apache2\cgi-bin\)
If you launch a xxx.php script with a double-click on the file name, you are not
running thru your Apache webserver, but just running a script directly via PHP.
To run a webserver script, you use your browser and reference it with the url
Code:
http://localhost/[COLOR="Blue"]somepath[/COLOR]/script.phtml
\somepath is relative to the Docroot of the webserver,
in apache typically \Apache2\htdocs\somepath\
By definition, xxx.TXT never invokes any program like php or apache regardless of how it is launched.