Outils pour utilisateurs

Outils du site


web:php:cakephp20

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
web:php:cakephp20 [2014/10/19 02:27] – [POST /users/1234/votes] sgariepyweb:php:cakephp20 [2022/02/02 00:42] (Version actuelle) – modification externe 127.0.0.1
Ligne 114: Ligne 114:
 ); );
 </code> </code>
 +
 +
 +===== API Key =====
 +
 +
 +
 +===== Sources =====
 +  * http://fr.slideshare.net/ceeram/cake-fest-2012-create-a-restful-api-14181476
 +  * https://github.com/kvz/cakephp-rest-plugin
 +  * http://miftyisbored.com/complete-restful-service-client-cakephp-tutorial/
 +====== Debug code ======
 +
 +
 +<code php>
 +/**
 + * Prints out debug information about given variable.
 + *
 + * Only runs if debug level is greater than zero.
 + *
 + * @param boolean $var Variable to show debug information for.
 + * @param boolean $showHtml If set to true, the method prints the debug data in a screen-friendly way.
 + * @param boolean $showFrom If set to true, the method prints from where the function was called.
 + * @link http://book.cakephp.org/view/458/Basic-Debugging
 + */
 +function debug($var = false, $showHtml = false, $showFrom = true) {
 +  if (Configure::read() > 0) {
 +    if ($showFrom) {
 +      $calledFrom = debug_backtrace();
 +      echo '<strong>' . substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1) . '</strong>';
 +      echo ' (line <strong>' . $calledFrom[0]['line'] . '</strong>)';
 +    }
 +    echo "\n<pre class=\"cake-debug\">\n";
 +
 +    $var = print_r($var, true);
 +    if ($showHtml) {
 +      $var = str_replace('<', '&lt;', str_replace('>', '&gt;', $var));
 +    }
 +    echo $var . "\n</pre>\n";
 +  }
 +}
 +</code>
 +
 +[[http://snipplr.com/view/52261/|Source]]
 +
 +
 ====== Références ====== ====== Références ======
  
   * [[http://www.willis-owen.co.uk/2011/11/dynamic-select-box-with-cakephp-2-0/|Dynamic select box with CakePHP 2.0]] -> Utilise jQuery pour mettre à jour un select pour une sous-catégorie, quand la catégorie est choisie.   * [[http://www.willis-owen.co.uk/2011/11/dynamic-select-box-with-cakephp-2-0/|Dynamic select box with CakePHP 2.0]] -> Utilise jQuery pour mettre à jour un select pour une sous-catégorie, quand la catégorie est choisie.
web/php/cakephp20.1413678462.txt.gz · Dernière modification : 2022/02/02 00:43 (modification externe)