Is there any trick to run .PHP files in windows XP from any folder by double clicking like HTML file ?
I use XAMPP but in this we need to put files ina special htdocs folder. I want to run file from any folder, desktop by double clicking.
After searching a lot I found a easy way to do this
PHPScriptNet – Great portable application for those who learning PHP. PHPScriptNet can run your PHP script anywhere in Windows machine without installing PHP or any webserver.
There is a significant difference in viewing HTML files vs. PHP files:
HTML files are static files interpreted by the browser. When you open them, the PATH to the HTML file is passes as an argument to the default browser which interprets and displays the file.
PHP files on the other hand are required to be interpreted by a PHP interpreter (XAMPP, in your case) before the resulting HTML is rendered by a browser. In this case, the local file PATH would have to be translated to the corresponding local URL, then sent to the browser.
You could write a simple script that replaces '/var/www/' with 'http://localhost:8888/' (with a regular expression, for example) and passes that to the browser. Then, associate PHP files with your script.