Guest User

Untitled

a guest
Jan 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2.  
  3. // this check prevents access to debug front controllers that are deployed by accident to production servers.
  4. // feel free to remove this, extend it or make something more sophisticated.
  5. if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1')))
  6. {
  7. die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
  8. }
  9.  
  10. require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
  11.  
  12. $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true);
  13. sfContext::createInstance($configuration);
  14. sfContext::getInstance()->getRouting()->prependRoute('a1', new SfRoute('/zzz', array('module' => 'pages', 'action' => 'showpage')));
  15. sfContext::getInstance()->dispatch();
Add Comment
Please, Sign In to add comment