0
任何人都可以解释为什么这条线在从shell调用时工作,但通过crontab调用时失败?当exec通过cron运行时,tar exec调用失败,通过shell工作
passthru("tar xvf $file $tarfile/application $tarfile/application_detail $tarfile/application_device_type $tarfile/genre_application");
}
的错误我得到了通过电子邮件发送的cron后
焦油itunes20100907 /应用: 无法打开:没有这样的文件或目录 itunes20100907/application_detail
您可以使用PHP中的'getcwd()'函数来找出脚本运行的路径。在cron作业的情况下,它可能是cron用户的主文件夹。如果是/ home/ubuntu /,那么itunes20100907/application的路径将被解释为/ home/ubuntu/itunes20100907/application – 2011-02-20 04:42:34