Guest User

Untitled

a guest
Jul 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
  4.  
  5. if (strpos($_SERVER['SERVER_NAME'], 'admin.') === 0) {
  6. $app = 'backend';
  7. } else {
  8. $app = 'frontend';
  9. }
  10.  
  11. if (substr($_SERVER['SERVER_NAME'], -3) == 'dev') {
  12. $env = 'dev';
  13. $debug = true;
  14. } else {
  15. $env = 'prod';
  16. $debug = false;
  17. }
  18.  
  19. $configuration = ProjectConfiguration::getApplicationConfiguration($app, $env, $debug);
  20. sfContext::createInstance($configuration)->dispatch();
Add Comment
Please, Sign In to add comment