开发者

How do I launch a PHP file using command line

开发者 https://www.devze.com 2023-03-15 20:42 出处:网络
Specifically I\'m looking at Symphony and I\'m running through this page. It suggests that I launch a file using command line开发者_C百科.

Specifically I'm looking at Symphony and I'm running through this page. It suggests that I launch a file using command line开发者_C百科.

OS: Windows Visa 32

Any help?


Open a command line, and type

php check_configuration.php

(Press Enter after that).

If you're trying to execute php on Windows, you need to set up your PATH variable to include the php binary directory beforehand.

If you're on a POSIX-compatible system (Linux/Mac OS X) and you're getting a "command not found error message", you need to install php and its CLI interface, often in a package php-cli or similar.


Generally, you should be able to do php -f somefile.php. See the PHP command line manual for more info. The link you gave also shows what to do.


Do exactly what it says on that page:

php server_check.php

Assuming you are in the dir containing servercheck.php.

Most of the other symfony commands actually use a single file you can invoke those with

symfony namespace:task [options] [arguments]

or

php symfony namespace:task [options] [arguments]


When it says to run that file, basically its the same as pasting that file to the directory of symphony's php config files, and then running it in your browser.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号