Installation and first controller
Create a minimum of your vhost
ServerName phpway DocumentRoot /var/www/phpway/public
If vhost is installed succesfully framework will ask you to create and give writable permissins to log file.
touch /var/www/phpway/public/../log/development.log chmod 777 /var/www/phpway/public/../log/development.log
Now, edit config/routes.php file and add first route to your controlelr. On default action is index. In our example we will create default controller.
$this->map->connect(array (
"*" => array (
"controller" => "default",
)
));
Then creata default controller, you can do it manually but we will generate using exising script.
$ php ./script/generate.php controller default index
exists app/controllers/
create app/controllers/default_controller.php
exists app/helpers/
create app/helpers/default_helper.php
exists app/views/
create app/views/default/
create app/views/default/index.phtml
And here you go, in app/controler directory you should find default_controller.php file with index action in it. Print some thing out in action
<?php class DefaultController extends AppController {
function index() {
echo "here";
}
}
?>
