CakePHP Cookbook 2.x
with Exception.renderer to handle application exceptions Error Handling Error configuration Creating your own error handler Changing fatal error behavior Debugging Basic Debugging Debugger Class Using URL. If a user requests /posts/view/3, then the value ‘3’ is passed as $id. We also do a bit of error checking to ensure that a user is actually accessing a record. If a user requests /posts/view, we return $this->redirect(array('action' => 'index')); } $this->Flash->error(__('Unable to add your post.')); } } } Note $this->request->is() takes a single argument0 码力 | 1096 页 | 958.62 KB | 1 年前3CakePHP Cookbook 2.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . com/public/app/webroot/; index index.php; access_log /var/www/example.com/log/access.log; error_log /var/www/example.com/log/error.log; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { page) ... php handling ... } Note: Recent configuration of PHP-FPM is set to listen to php-fpm socket instead of TCP port 9000 on address 127.0.0.1. If you get 502 bad gateway error from above configuration0 码力 | 820 页 | 2.52 MB | 1 年前3CakePHP Cookbook 3.x
Variables General Configuration Using a CDN Database Configuration Caching Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing Routing Custom Route Classes Default Route Class Fallbacks Method Creating Persistent URL Parameters Handling Named Parameters in URLs Dispatcher Filters Request & Response Objects Request Request Parameters Digest Authentication Creating Custom Authentication Objects Using Custom Authentication Objects Handling Unauthenticated Requests Displaying Auth Related Flash Messages Hashing Passwords Creating Custom0 码力 | 1244 页 | 1.05 MB | 1 年前3CakePHP Cookbook 4.x
Variables General Configuration Using a CDN Database Configuration Caching Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing Digest Authentication Creating Custom Authentication Objects Using Custom Authentication Objects Handling Unauthenticated Requests Displaying Auth Related Flash Messages Hashing Passwords Creating Custom Assertion methods Error & Exception Handling Error & Exception Configuration Deprecation Warnings Changing Exception Handling Listen to Events Custom Error Templates Custom Error Page Layout Custom0 码力 | 1249 页 | 1.04 MB | 1 年前3CakePHP Cookbook Documentation 5.x
Variables General Configuration Using a CDN Database Configuration Caching Configuration Error and Exception Handling Configuration Logging Configuration Email Configuration Session Configuration Routing Testing Mailers Assertion methods Error & Exception Handling Configuration Deprecation Warnings Changing Exception Handling Listen to Events Custom Templates Custom Error Page Layout Custom Controller HTTP Exceptions in your Controllers Other Built In Exceptions Customizing PHP Error Handling Custom Error Logging Custom Error Rendering Events System Example Event Usage Accessing Event Managers Global0 码力 | 1080 页 | 939.39 KB | 1 年前3CakePHP Cookbook 3.x
Persistent URL Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Handling Named Parameters in URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709 19 Error & Exception Handling 711 Error & Exception Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711 Changing Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 Customize Error Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 Customize0 码力 | 967 页 | 2.80 MB | 1 年前3CakePHP Cookbook 4.x
. . 681 19 Error & Exception Handling 685 Error & Exception Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 Changing Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 Custom Error Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 Custom Error Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 Custom Error Rendering . . . . . . . . . . . . . . .0 码力 | 967 页 | 2.88 MB | 1 年前3CakePHP Cookbook Documentation 5.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 19 Error & Exception Handling 579 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 Changing Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 Listen to . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 Customizing PHP Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 20 Events0 码力 | 848 页 | 2.53 MB | 1 年前3
共 8 条
- 1