How do you define paths in application?

Posted by Hemaulo on Stack Overflow See other posts from Stack Overflow or by Hemaulo
Published on 2010-05-20T11:23:34Z Indexed on 2010/05/20 11:30 UTC
Read the original article Hit count: 163

Filed under:
|

I'm using global constants, like this:

/project
    /application
        bootstrap.php
    /public
        index.php

index.php

  • defines PUBLIC_PATH and APPLICATION_PATH
  • calls APPLICATION_PATH . bootstrap.php

bootstrap.php

  • defines LIBRARY_PATH, MODULES_PATH, TEMP_PATH, CONFIG_PATH, ...
  • does real work

Also i want to ask if there is better way to do this?

© Stack Overflow or respective owner

Related posts about php

Related posts about config