Your Location is: Home > Php

Can I use PHP built-in webserver to run simple CGI scripts on localhost?

From: Albania View: 1749 Konstantin 


I can run a simple built-in webserver with command "php -S localhost:8001" I find it very simple and useful for creating bookmarklets for the browser, as .js files. Now I would like to know if it is able to run CGI scripts too? I should maintain a simple key-value database from the javascript code of the bookmarklet.

Best answer

No, it can't.

You could probably write a wrapper around a CGI program in PHP, but it would be easier to use a more suitable webserver.