ErrorController.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * ErrorController
  4. * Feel free to change this and customize your own error message
  5. *
  6. * @author darkredz
  7. */
  8. class ErrorController extends DooController{
  9. function emailtext(){
  10. $redis = new Redis();
  11. $redis->connect('120.27.200.79', '6379');
  12. $redis->set('name','leesin');
  13. echo $redis->get('name');
  14. die;
  15. // $trainStatus = $this->get_args ( 'substitution_vars' ) ? $this->get_args ( 'substitution_vars' ) : "";
  16. // file_put_contents(DOO::conf ()->SITE_PATH . "upload/invoice/email.json", $trainStatus.PHP_EOL,FILE_APPEND);
  17. }
  18. public function index(){
  19. echo '<h1>ERROR 404 not found</h1>';
  20. echo '<p>This is handler by an internal Route as defined in common.conf.php $config[\'ERROR_404_ROUTE\']</p>
  21. <p>Your error document needs to be more than 512 bytes in length. If not IE will display its default error page.</p>
  22. <p>Give some helpful comments other than 404 :(
  23. Also check out the links page for a list of URLs available in this demo.</p>';
  24. }
  25. function get_args($name) {
  26. if (isset ( $_GET [$name] )) {
  27. if (is_array ( $_GET [$name] ))
  28. return $_GET [$name];
  29. else
  30. return addslashes ( $_GET [$name] );
  31. } elseif (isset ( $_POST [$name] )) {
  32. if (is_array ( $_POST [$name] ))
  33. return $_POST [$name];
  34. else
  35. return addslashes ( $_POST [$name] );
  36. } else
  37. return false;
  38. }
  39. }
  40. ?>