title: start php web server from any folder
body: <p>I want to start a php server from a folder in my ubuntu system I tried the following command.</p>
  
  <pre><code>php -S localhost:8000
  </code></pre>
  
  <p>But it is not starting the server. I am getting the following output</p>
  
  <pre><code>Usage: php [options] [-f] &lt;file&gt; [--] [args...]
         php [options] -r &lt;code&gt; [--] [args...]
         php [options] [-B &lt;begin_code&gt;] -R &lt;code&gt; [-E &lt;end_code&gt;] [--] [args...]
         php [options] [-B &lt;begin_code&gt;] -F &lt;file&gt; [-E &lt;end_code&gt;] [--] [args...]
         php [options] -- [args...]
         php [options] -a
  
    -a               Run as interactive shell
    -c &lt;path&gt;|&lt;file&gt; Look for php.ini file in this directory
    -n               No php.ini file will be used
    -d foo[=bar]     Define INI entry foo with value 'bar'
    -e               Generate extended information for debugger/profiler
    -f &lt;file&gt;        Parse and execute &lt;file&gt;.
    -h               This help
    -i               PHP information
    -l               Syntax check only (lint)
    -m               Show compiled in modules
    -r &lt;code&gt;        Run PHP &lt;code&gt; without using script tags &lt;?..?&gt;
    -B &lt;begin_code&gt;  Run PHP &lt;begin_code&gt; before processing input lines
    -R &lt;code&gt;        Run PHP &lt;code&gt; for every input line
    -F &lt;file&gt;        Parse and execute &lt;file&gt; for every input line
    -E &lt;end_code&gt;    Run PHP &lt;end_code&gt; after processing all input lines
    -H               Hide any passed arguments from external tools.
    -s               Output HTML syntax highlighted source.
    -v               Version number
    -w               Output source with stripped comments and whitespace.
    -z &lt;file&gt;        Load Zend extension &lt;file&gt;.
  
    args...          Arguments passed to script. Use -- args when first argument
                     starts with - or script is read from stdin
  
    --ini            Show configuration file names
  
    --rf &lt;name&gt;      Show information about function &lt;name&gt;.
    --rc &lt;name&gt;      Show information about class &lt;name&gt;.
    --re &lt;name&gt;      Show information about extension &lt;name&gt;.
    --ri &lt;name&gt;      Show configuration for extension &lt;name&gt;.
  </code></pre>
  
  <p>but i googled this many times and I did not find any solution.How should I proceed?Please help</p>