Tuesday 14 August 2018

Serve a Directory with PHP

Many developers have a giggle at PHP, even looking down at the language, but let's be honest: most of our blogs are powered by it (WordPress) and it's a great language to dabble around with. I cut my teeth on PHP, though I prefer to avoid PHP these days.


But when I need to experiment with a simple PHP coding task for the sake of a blog feature, I look for the simplest possible serving solution to accomplish that feat. Luckily PHP provides me a quick solution for testing:php -S localhost:8888


The command above allows for serving of a directory via PHP, thus allowing for a simple PHP "site" to be served enough to confirm that my code testing works properly.

0 comments:

Post a Comment