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.
我有一个备份数据库并将其发送到远程服务器的 cronjob。文件发送成功后,应该删除本地副本。我遇到的问题是它没有删除本地副本。当我从命令行运行它时,它可以正常工作,但不能从 cron 运行。
// After uploading. // $path is the absolute path to the file. if(file_exists($path)) { unlink($path); }
我也试过了rm $path。它也不适用于cron。我做错了什么?谢谢你。
rm $path