How to serve a .php file locally?
Posted
by
isomorphismes
on Server Fault
See other posts from Server Fault
or by isomorphismes
Published on 2012-09-26T03:27:19Z
Indexed on
2012/09/26
3:39 UTC
Read the original article
Hit count: 197
This part of the PHP documentation says that I should be able to make a small, fake server to serve up some local .php
files in a folder using
php -S localhost:8000
. But when I try that I get the following error:
Usage: php [options] [-f] <file> [--] [args...]
php [options] -r <code> [--] [args...]
php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
php [options] -- [args...]
php [options] -a
What am I doing wrong?
© Server Fault or respective owner