controller - 蛋糕PHP 2.3.8 : Calling Another Controller function in CronController. php

标签 controller cakephp-2.0 cakephp-2.3 cron-task

对于 CakePHP 2.3.8如何在 CronController.php 中调用另一个 Controller 函数

有任何想法吗?

最佳答案

下面是代码:

App::import('Controller', 'Products'); // mention at top

// Instantiation // mention within cron function
$Products = new ProductsController;
// Call a method from
$Products->ControllerFunction();

希望它可以帮助某人!

关于controller - 蛋糕PHP 2.3.8 : Calling Another Controller function in CronController. php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19344988/

相关文章:

unit-testing - 我如何在 CakePHP 2.0 中测试 Add 函数

php - 服务器上的 CakeEmail 问题

php - 插件模型关联在 cakephp 2.3 中无法使用 cake ACL 工作

php - CakePHP 节省约定

javascript - 全日历 + FancyBox2 : Passing and setting input value

flutter - 自动填充条件的textformfield Controller

ruby-on-rails - rails 4.1.6 在似乎未显示的 rake route 添加索引

php - CakePHP 将共享代码放在哪里?

node.js - 异步等待然后在同一个函数上

javascript - 为什么我不需要在 Sails.js Controller 函数中调用 next,即使它的主体中有一个(异步?)数据库查询?