chanchelkumar Posted May 24, 2011 Share Posted May 24, 2011 Hello Everyone, I am trying to create a desktop shortcut icon to my index.php in htdocs ? Is it possible.. i tried but it is opening as a php file in dreamweaver ... Can anybody give suggestions? Hope u get the issue!! Thanks in advance!! Quote Link to comment Share on other sites More sharing options...
Psycho Posted May 24, 2011 Share Posted May 24, 2011 You will need to have a web server running on your machine and then have an html link to the file relative to the web server path. So, if the file is in the root of the htdocs, then the URL would look something like http://localhost/index.php. Of course, you can probably leave off the file name since index.php will more than likely be in the list of default file names. By linking directly to the file you are treating it as a file on your PC and Windows is trying to open the file. To get the rendered page of a PHP file you need to request the file through a web server. The webserver will then find the file and process the PHP code before sending the rendered output to the browser. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted May 24, 2011 Share Posted May 24, 2011 You could do this: - Create a File with this: START C:\php\php.exe C:\phpFiles\test1.php - save the file as "something.bat" When you want to run your php file, you click on "something.bat" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.