自己在LINUX下写的SERVER,如何调用PHP解析器?多谢啦

解决方案 »

  1.   

      以下是 PHP 二进制文件(即 php.exe 程序)提供的命令行模式的选项参数,您随时可以通过 PHP -h 命令来查询这些参数。 Usage: php [options] [-f] <file> [args...]
           php [options] -r <code> [args...]
           php [options] [-- args...]
      -s               Display colour syntax highlighted source.
      -w               Display source with stripped comments and whitespace.
      -f <file>        Parse <file>.
      -v               Version number
      -c <path>|<file> Look for php.ini file in this directory
      -a               Run interactively
      -d foo[=bar]     Define INI entry foo with value 'bar'
      -e               Generate extended information for debugger/profiler
      -z <file>        Load Zend extension <file>.
      -l               Syntax check only (lint)
      -m               Show compiled in modules
      -i               PHP information
      -r <code>        Run PHP <code> without using script tags <?..?>
      -h               This help  args...          Arguments passed to script. Use -- args when first argument 
                       starts with - or script is read from stdin
     
    php -f my_script.phpmain()
    {
      system("php -f my_script.php");
    }是这个意思吗?
      

  2.   

    php安装的时候装成cgi模式,命令行直接敲 php -q *.php好了
      

  3.   

    读取数据库可以实现了
    可是如果由a.php向b.php用post方法传递参数的话,我自己的server可以获得参数值,可是如何传给b.php呢?
    程序中php5用$_REQUEST["变量名"]获得值。
      

  4.   

    读取数据库可以实现了
    可是如果由a.php向b.php用post方法传递参数的话,我自己的server可以获得参数值,可是如何传给b.php呢?
    程序中php5用$_REQUEST["变量名"]获得值。
      

  5.   

    把参数追加在命令后面,lz可以在b.php里 var_dump($argv); 看一下