我通过控制面板设置了一个cron作业.我已经通过我的FTP上传了脚本,将其权限设置为777(这样做是否安全?)并在作业中提供了此脚本的路径.现在,该脚本使用依赖脚本来运行作业.混乱?这就是它的样子:
cron.php
<?php require("some_file1.php");
require("file1.php");
require("folder1/file1.php");
require("folder1/file2.php");
require("folder2/file1.php");
//This value is actually received from one of the require files above after come calculations
$get_content = 'This is some value received after calculations.';
mail('Hi', 'email@mydomain.com', $get_content, 'Error');
?>
Run Code Online (Sandbox Code Playgroud)
我选择在我的电子邮件中收到确认Cron作业,这是我收到的错误:
mydomain.com/cron.php: line 1: syntax error near unexpected token `('
mydomain.com/cron.php: line 1: `<?php require("some_file1.php");
'
Run Code Online (Sandbox Code Playgroud)
我尝试与支持人员交谈,但他们对这些技术细节一无所知,目前技术人员无法使用.如果有人可以帮助我,这将是很棒的.
期待您的回复.
谢谢.
我认为,他们有mod_php和命令行php的不同配置文件.要检查的另一件事 - 尝试将解释器字符串添加到php文件的顶部:
例如:
#!/usr/local/sbin/php
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4411 次 |
| 最近记录: |