How do I run a PHP enabled server from the command line? -


i started developing php via wamp/mamp stacks. these work, there lot of painful caveats deal with.

more recently, i've begun working other software stacks, rails, can run server arbitrary directories minimum of configuration, muss, or fuss. simple rails -s or python -m simplehttpserver 8000. (ok, second 1 might not simple).

unfortunately, rails 1 running rails server. python 1 sets simple http server. neither 1 appropriate running php code.

are there alternatives out there run php based server arbitrary directory -- in case, development directory of app want work on? i'd prefer mac osx, if there's windows version available well, i'd love hear it.

as of 5.4, php includes built-in web server can used development.

for example:

php -s localhost:8000 index.php 

documentation: built-in web server

but keep in mind:

this web server designed aid application development. may useful testing purposes or application demonstrations run in controlled environments. not intended full-featured web server. should not used on public network.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -