Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a php file by double clicking?

Tags:

php

Is there any way to run a php file by a shortcut in hard drive?..not by writing any protocol in the browser. I am making an online examination system in PHP. And I using Wampserver. I want to run my first page from a shortcut(like html), from then other linked pages will run sequentially.thanks in advance....

like image 930
user3587561 Avatar asked May 01 '14 04:05

user3587561


People also ask

How do I trigger a PHP file?

php” file is placed inside the “htdocs” folder. If you want to run it, open any web browser and enter “localhost/demo. php” and press enter. Your program will run.

How do I run a PHP file in Safari?

Open the Finder and go to /Library/WebServer/Documents/localhost . All files that are in there are processed by the local webserver (Apache and PHP, if you want to know that). Place your file in there and open your webserver and call http://localhost/YourFile.php and it will call the file YourFile.


2 Answers

First Copy your local url from browser http://localhost/xxx/xxx.php

Then go to your desktop press Right click in Mouse choose -> New -> Shortcut.

Now paste copied Link then press next and finish button shortcut ready.

Then copy that shortcut and paste it in anywhere.

like image 174
Manibharathi Avatar answered Sep 30 '22 19:09

Manibharathi


If your wampserver is on, you can place this meta HTML tag in your .html file:

<meta HTTP-EQUIV="REFRESH" content="0; url=http://localhost/index.php">

It's an HTML way of redirecting, content is the number of seconds after which you want the redirect to take place and url is the location you want to redirect to.

like image 23
AyB Avatar answered Sep 30 '22 20:09

AyB