CakePHP Cookbook 2.x
CakePHP comes with a set of view helpers that make things like linking, form output, JavaScript and AJAX a snap. You can learn more about how to use them in Helpers, but what’s important to note here is single argument, which can be the request METHOD (get, put, post, delete) or some request identifier (ajax). It is not a way to check for specific posted data. For instance, $this->request->is('book') will presentational logic to be accessed and shared between views. One of the core helpers, JsHelper, makes AJAX requests within views much easier and comes with support for jQuery (default), Prototype and Mootools0 码力 | 1096 页 | 958.62 KB | 1 年前3
CakePHP Cookbook 2.x
CakePHP comes with a set of view helpers that make things like linking, form output, JavaScript and AJAX a snap. You can learn more about how to use them in Helpers, but what’s important to note here is single argument, which can be the request METHOD (get, put, post, delete) or some request identifier (ajax). It is not a way to check for specific posted data. For instance, $this->request->is('book') will presentational logic to be accessed and shared between views. One of the core helpers, JsHelper, makes AJAX requests within views much easier and comes with support for jQuery (default), Prototype and Mootools0 码力 | 820 页 | 2.52 MB | 1 年前3
CakePHP Cookbook 4.x
instead of defining view class mappings in RequestHandlerComponent. The automatic view switching for ‘ajax’ requests offered by RequestHandlerComponent is deprecated. Instead you can either handle this in beforeRender. if ($this->request->is('ajax')) { $this->viewBuilder()->setClassName('Ajax'); } Alternatively, you can have the HTML view class switch to the ajax layout as required in your controller the current request is HEAD. is('options') Check to see whether the current request is OPTIONS. is('ajax') Check to see whether the current request came with X-Requested- With = XMLHttpRequest. is('ssl')0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 4.x
instead of defining view class mappings in RequestHandlerComponent. The automatic view switching for ‘ajax’ requests offered by RequestHandlerComponent is deprecated. Instead you can either handle this in beforeRender. if ($this->request->is('ajax')) { $this->viewBuilder()->setClassName('Ajax'); } Alternatively, you can have the HTML view class switch to the ajax layout as required in your controller current request is HEAD. • is('options') Check to see whether the current request is OPTIONS. • is('ajax') Check to see whether the current request came with X-Requested-With = XMLHttpRequest. • is('ssl')0 码力 | 967 页 | 2.88 MB | 1 年前3
CakePHP Cookbook 3.x
Cross Site Request Forgery Using the CsrfComponent Integration with FormHelper CSRF Protection and AJAX Requests Disabling the CSRF Component for Specific Actions Security Component Handling Blackhole the current request is HEAD. is('options') Check to see whether the current request is OPTIONS. is('ajax') Check to see whether the current request came with X-Requested- With = XMLHttpRequest. is('ssl') file relative to the src/Template folder. This allows direct rendering of elements, very useful in AJAX calls: // Render the element in src/Template/Element/ajaxreturn.ctp $this->render('/Element/ajaxreturn');0 码力 | 1244 页 | 1.05 MB | 1 年前3
CakePHP Cookbook Documentation 5.xthe current request is HEAD. is('options') Check to see whether the current request is OPTIONS. is('ajax') Check to see whether the current request came with X-Requested- With = XMLHttpRequest. is('ssl') element file relative to the templates folder. This allows direct rendering of elements, very useful in AJAX calls: // Render the element in templates/element/ajaxreturn.php $this->render('/element/ajaxreturn'); after content-type negotiation is attempted. Using AjaxView In applications that use hypermedia or AJAX clients, you often need to render view contents without the wrapping layout. You can use the AjaxView0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook Documentation 5.xwhether the current request is OPTIONS. Request 169 CakePHP Cookbook Documentation, Release 5.x • is('ajax') Check to see whether the current request came with X-Requested-With = XMLHttpRequest. • is('ssl') element file relative to the templates folder. This allows direct rendering of elements, very useful in AJAX calls: // Render the element in templates/element/ajaxreturn.php $this->render('/element/ajaxreturn'); CakePHP Cookbook Documentation, Release 5.x Using AjaxView In applications that use hypermedia or AJAX clients, you often need to render view contents without the wrapping layout. You can use the AjaxView0 码力 | 848 页 | 2.53 MB | 1 年前3
CakePHP Cookbook 3.x
current request is HEAD. • is('options') Check to see whether the current request is OPTIONS. • is('ajax') Check to see whether the current request came with X-Requested-With = XMLHttpRequest. • is('ssl') file relative to the src/Template folder. This allows direct rendering of elements, very useful in AJAX calls: // Render the element in src/Template/Element/ajaxreturn.ctp $this->render('/Element/ajaxreturn'); matters. If authenticator returns null, AuthComponent redirects user to the login action. If it’s an AJAX request and config ajaxLogin is specified that element is rendered else a 403 HTTP status code is0 码力 | 967 页 | 2.80 MB | 1 年前3
共 8 条
- 1













