Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我运行这个命令时:
php -q /var/www/project/test.php
但除非我运行此命令,否则它不起作用:
cd /var/www/project/
你能帮我在不执行 CD 的情况下运行这个命令吗?
完全限定您的mail.txt文件。将您的 php 文件更改为:
mail.txt
<?php $fh=fopen('/var/www/project/mail.txt','w'); fwrite($fh,'Success'); fclose($fh); ?>