Eng_Farghly Eng_Farghly - 2 years ago 89
PHP Question

Can i run php code from A url that is generate from cmd?

In the

Frameworks
like
symfony
you can run php code
without any software
from
cmd
you write
php bin/console server:run
after you run this command it generate URL like
http://127.0.0.1:8000
Can i run php code from A url that is generate from cmd.

Answer Source

PHP has a Built-in web server since 5.4.0:

Linux:

/path/to/php -S 127.0.0.1:8080

Windows:

c:\path\to\php -S 127.0.0.1:8080

Will yield:

PHP 5.6.5 Development Server started at Thu Jul 27 10:46:10 2017
Listening on http://127.0.0.1:8080
Document root is C:\tmp
Press Ctrl-C to quit.

As shown, the web server document root will be the directory you ran the command from.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download