【发布时间】:2014-04-03 11:44:02
【问题描述】:
如何从我的组件调用 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 用于 cronjob 内容或您希望通过控制台而不是组件运行的任何操作。你想让我做什么?不给我场景..
-
你不能直接从前面运行shell。