php - CodeIgniter error pages show in popup mode -


How can we display all kinds of error messages without redirecting error pages application \ errors \ * Error_pages *
Here, we will be in the same page and if any error occurs on the action, it will appear in popup mode. Can anyone help me with code example?

Although the question is not clear, you can check the availability of a 404-Not Found page like this. : -

The first open routes in the App / Config folder Set php and a custom controller name.

  $ route ['404_override'] = 'my404 / 404_page'; // is the name of my404 class.  

Create a new administrator and type the following code into it.

  & lt ;? Php class my404 CI_Controller {public function __construct () {parent:: __ generation (); } Public Function 404_page () {// Instead of loading any view, simply handle this response via AJAX call from your client side $ error = array (); $ Error ['ERROR_CODE'] = '404'; $ Error ['error_message'] = 'This URL was not found'; Echo json_encode ($ error); }}? & Gt;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -