用于CakePHP的googleajax库API处理程序
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用于CakePHP的googleajax库API处理程序相关的知识,希望对你有一定的参考价值。
[Google's "AJAX Libraries API"](http://code.google.com/apis/ajaxlibs/) is great and all, but can slow things down if you're doing a lot of refreshing/cache clearing while debugging. Here's a neat trick: stuff something like this in the `` of your Cakephp Layout to use local versions of these libraries while you're debugging:
/** * Google Ajax Libraries API handler for CakePHP * * Neat trick to load local versions of javascript libraries while * debugging, but Google-hosted versions for production. * Automatically detects whether debugging is turned on, and * defaults to jQuery, the best JavaScript library. * * Just shove it in your <head> and forget about it :) * I usually store it somewhere like: /elements/google-jsapi.ctp */ else $library .= '-local'; switch ($library) { case 'jquery': break; case 'jquery-local': break; case 'prototype': break; case 'prototype-local': break; }
以上是关于用于CakePHP的googleajax库API处理程序的主要内容,如果未能解决你的问题,请参考以下文章
在Wordpress中从googleajax库API加载jQuery
php [cakephp:API组件和控制器]用于ajax请求和Server-Sent事件的Cake模块。 #cakephp