Local Server without Apache [PHP]
Almost all PHP programmers use Apache or NGINX as their server.
Even they're just coding using PHP (no SQL).
For this reson, Actually you can start your own server with just using the executable php file
in Windows (php.exe).
Thi s very useful if you want to experiment or learn more about PHP without database. You still can use MySQL if the socket was started.
Note : This only works for PHP version 5.4
Steps:
Fire up your terminal or command prompt in windows
Now
cd
in your web project. in my case its inJ:\Userrs\White\myproject
Picture
- And type
php -S [serverip/domain:port]
In this case I typephp -S localhost:8089
Picture
You can set any port as long it is not being use.
And now fire up your facourite browser
Goto
localhost:8089
in my case.Notice the index.php in my project folder is loaded in browser
Picture
Written by Widy Graycloud
Related protips
4 Responses
Add your response
Add your response
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#