Home > Backend Development > PHP Tutorial > 批处理运行PHP程序权限有关问题

批处理运行PHP程序权限有关问题

WBOY
Release: 2016-06-13 10:27:23
Original
792 people have browsed it

批处理运行PHP程序权限问题
批处理是这样的D:\host\php\php.exe E:\baoxian\web\index.php
E:\baoxian\web\index.php 文件内容为:

PHP code
<!--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");?>
Copy after login

运行后显示:haha2012-06-12 11:44:16

通过HTTP访问PHP程序可以建立一个记事本的,但是用批处理却无法建立,求解。

------解决方案--------------------
注意你在哪个路径下执行的php.ext,那么test.txt就应当生成在哪里,注意:进程的当前工作目录。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template