如何从我的组件调用 shell。
这是我的外壳
<?php
class PrintShell extends AppShell {
function main()
{
App::import(‘Component’, ‘BusinessLogic’);
$businessLogic = & new BusinessLogicComponent();
$businessLogic->initialize();
$settings = $businessLogic->senReminderEmail();
// senReminderEmail Mail function is defined in my Controller/Components/BusinessLogicComponent.php File
}
}
?>
我不希望它使用命令调用。我该怎么做。任何帮助这有意义吗?
你想调用shell。我想,你想在Cakephp中使用cron job吗?大多数情况下,appshell曾经与cron job一起工作,我也遇到过这个问题,我没有使用Appshell,我从Godaddy服务器设置了我的cron作业,并将所有文件放在Webroot文件夹中,这些文件夹可能在cron期间运行,所以我只是验证了。亲爱的。。