cakephp

Autoscuola Alba

Alba a Borgo Valsugana, Pergine, Trento
Sito web per Borgo Valsugana, Pergine, Trento, Laives, Pinè - Trentino

Il sito web dell'Autoscuola è stato sviluppato continuando lo stile e la qualità informativa che lo caratterizzava cercando di far crescere la comodità d'uso e la semplicità di navigazione attraverso adattamenti nell'interfaccia grafica e nella navigazione utente.

Cakephp and xml serialization

controller

// Require a Root node and a "row" container as follow
$this->set('models', array("RootNode" => array( "Row" => $this->Model->find('all'))));

view

Views/Model/xml/index.ctp

<?
      $xml = Xml::build($models);
      echo $xml->saveXML();  
?>

I needed either to copy the CORE/layout/xml/default.php to app directory and remove the <?xml definition as it get duplicated (simplexml will add it)

cakephp cron job

I want to start a cron process on my website from a public url, eg. example.com/cron.php using cakephp (v 1.3.6, in this case)

This page will trigger the method cron() in each controller defined in app/controller

This code isn't neither tested enough, neither approved by nobody else than me, so don't be surprised if it doesn't work at all :O

The bigger issues is that will break the work if some errors happens in called controller method, going to AppError controller as used in CakePHP. Consider overriding it to handle error situation.

cakephp last inserted id

$this->Invoice->save( $invoice );
$id = $this->Invoice->id;

http://book.cakephp.org/view/312/Models
$this->Model->getLastInsertId();

http://cakephp.1045679.n5.nabble.com/Get-the-last-insert-id-td3236536.html

Subscribe to RSS - cakephp