批处理运行PHP程序权限问题
批处理是这样的D:\host\php\php.exe E:\baoxian\web\index.php
E:\baoxian\web\index.php 文件内容为:
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?phpdate_default_timezone_set('PRC');file_put_contents('test.txt',date("Y-m-d H:i:s"));echo "haha".date("Y-m-d H:i:s");?>
运行后显示:haha2012-06-12 11:44:16
通过HTTP访问PHP程序可以建立一个记事本的,但是用批处理却无法建立,求解。
——解决方案——————–
注意你在哪个路径下执行的php.ext,那么test.txt就应当生成在哪里,注意:进程的当~来1源gaodai#ma#com搞*代#码1网搞代gaodaima码前工作目录。