Run php code in command line

前端 未结 4 532
南笙
南笙 2021-01-01 10:38

I just began learning php. I\'ve installed php5 on linux and wrote very simple code just to get going.

How can I run scripts? I tried using the

4条回答
  •  走了就别回头了
    2021-01-01 11:09

    Shorter way for command line:

    php -r 'echo "Hello "; echo "Jay";'
    OR
    php -r 'echo dirname("parent/child/reply") . "\n";'

提交回复
热议问题