cron ZF2. public_html cpanel. , cron, , , , ZF2 -, .
, , , .
, .
. Cron:
Cron
config
module.config.php
src
Cron
Controller
IndexController.php
autoload_classmap.php
Module.php
, , console, :
module.config.php
return array(
'controllers' => array(
'invokables' => array(
'Cron\Controller\IndexController' => 'Cron\Controller\IndexController'
),
),
'console' => array(
'router' => array(
'routes' => array(
'my-first-route' => array(
'type' => 'simple',
'options' => array(
'route' => 'hello',
'defaults' => array(
'controller' => 'Cron\Controller\IndexController',
'action' => 'index'
)
)
)
),
),
),
);
IndexController::
<?php
namespace Cron\Controller;
use Zend\Mvc\Controller\AbstractActionController;
class CronController extends AbstractActionController
{
public function indexAction()
{
echo "hello";
echo "\r\n";
}
}
, !
The autoload_classmap.php and Module.php files are standard.
, Zend Manual, , .
trunk ( public_html) ( ) :
path/to/trunk>php public/index.php hello
:
hello
path/to/trunk>
, : http://collabedit.com/58v4v
php , "php", " php". php , ...
.