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!! Link to comment https://forums.phpfreaks.com/topic/237338-create-a-desktop-shortcut/ 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. Link to comment https://forums.phpfreaks.com/topic/237338-create-a-desktop-shortcut/#findComment-1219604 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" Link to comment https://forums.phpfreaks.com/topic/237338-create-a-desktop-shortcut/#findComment-1219638 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.