tite fractale

memento Kohana

BASE URL::base() http://kohanaframework.org/3.2/guide/api/URL view $this->response->body(View::factory('pages/about')); http://kohanaframework.org/3.2/guide/kohana/mvc/views

URLs et params: http://docs.kohanaphp.com/general/urls http://kohanaframework.org/3.0/guide/kohana/mvc/controllers // Assuming Route::set('example','(/(/(/)))'); public function action_foobar() { $id = $this->request->param('id'); $new = $this->request->param('new');

routes? http://kohanaframework.org/3.0/guide/kohana/routing dans bootstrap.php:

Route::set('sections', '<directory>(/<controller>(/<action>(/<id>)))',
    array(
        'directory' => '(admin|affiliate)'
    ))
    ->defaults(array(
        'controller' => 'home',
        'action'     => 'index',
    ));

DB: http://kohanaframework.org/3.2/guide/database http://kohanaframework.org/3.2/guide/database/config http://kohanaframework.org/3.1/guide/database/examples http://kohanaframework.org/3.0/guide/api/DB $default = Database::instance(); décommenter module dans bootstrap dans app/conf/database.php

<?php
return array
(
    'default' => array
    (
        'type'       => 'mysql',
        'connection' => array(
            'hostname'   => 'localhost',
            'username'   => 'root',
            'password'   => '',
            'persistent' => FALSE,
            'database'   => 'personnages',

    $defaultDB = Database::instance();
    // var_dump(get_class_methods($defaultDB));
    $result = $defaultDB->query(Database::SELECT, 'SELECT id, nom, puissance, degats, niveau, experience FROM personnages WHERE id = 1');
    // var_dump(get_class_methods($result));
    var_dump($result->get('nom'));









Page générée le 27/05/2021, 09h53'27" (source).
historique de la page
historique global