视窗相当于#!的/ usr / bin中/ PHP [英] Windows equivalent to #!/usr/bin/php
问题描述
我试图执行从SOS柏林的jobscheduler的PHP文件。我的操作系统是Windows 7,我的文档以下
的http://www.sos-berlin.com/mediawiki/index.php/How_to_execute_a_PHP_script_with_JS
#!的/ usr / bin中/ PHP< PHP 回声你好;?>
但是,当我执行我收到错误的脚本
'#!'不被识别为内部或外部的命令,可操作的程序或批处理文件。
我才明白,#!的/ usr / bin中/ PHP是一个linux命令。我应该在这里给等效的批处理命令。我用Google搜索,但没有发现任何有用的结果。请任何一个可以帮助我...
先谢谢了。
- 转到您的桌面。
- 右键单击桌面我的电脑快捷方式。
- 单击属性。
- 您应该看到控制面板的一个部分 - 控制面板\\系统和安全\\系统
- 单击高级系统设置在左侧菜单中。
- 单击Enviornment变量对窗口的底部。
- 选择路径。
- 附加你的PHP路径(C:\\ MyFolder文件\\ PHP)到PATH环境变量,由分号从已经存在的字符串分隔
- 单击确定
- 打开你的CMD
- 键入PATH,preSS输入
- 确保你看到的名单当中你的PHP文件夹中。
在用户变量列表
这应该工作。
I am trying to execute a php file from sos-berlin jobscheduler. My OS is windows 7. I am following the documentation
http://www.sos-berlin.com/mediawiki/index.php/How_to_execute_a_PHP_script_with_JS
#!/usr/bin/php
<?php
echo "hello";
?>
But when I executed the script I am getting the error that
'#!' is not recognized as an internal or external command, operable program or batch file.
I came to understand that #!/usr/bin/php is a linux command. I should give here equivalent batch command. I googled, but didn't find any useful result. Please any one help me...
Thanks in advance.
- Go to your desktop.
- Right click My Computer shortcut in the desktop.
- Click Properties.
- You should see a section of control Panel - Control Panel\System and Security\System.
- Click Advanced System Settings on the Left menu.
- Click Enviornment Variables towards the bottom of the window.
- Select PATH in the user variables list.
- Append your PHP Path (C:\myfolder\php) to your PATH variable, separated from the already existing string by a semi colon.
- Click OK
- Open your "cmd"
- Type PATH, press enter
- Make sure that you see your PHP folder among the list.
That should work.
这篇关于视窗相当于#!的/ usr / bin中/ PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!