Click here to Skip to main content
15,904,497 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 12:29
professionalJeremy Falcon6-Oct-14 12:29 
GeneralRe: PHP Pin
David O'Neil6-Oct-14 12:36
professionalDavid O'Neil6-Oct-14 12:36 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 13:20
professionalJeremy Falcon6-Oct-14 13:20 
GeneralRe: PHP Pin
David O'Neil6-Oct-14 13:25
professionalDavid O'Neil6-Oct-14 13:25 
GeneralRe: PHP Pin
David O'Neil6-Oct-14 13:38
professionalDavid O'Neil6-Oct-14 13:38 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 13:52
professionalJeremy Falcon6-Oct-14 13:52 
GeneralRe: PHP Pin
David O'Neil6-Oct-14 14:02
professionalDavid O'Neil6-Oct-14 14:02 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 14:08
professionalJeremy Falcon6-Oct-14 14:08 
Keep in mind the path would no longer be relative to the actual file doing the including, but to the BASE_PATH constant. So if you had something like /home/myapp/mymodule/myotherfile.php that included some files in say /home/myapp/newdir/awesome.php, you'd want to do something like this require_once BASE_PATH . 'newdir/awesome.php';.

Keep in mind, BASE_PATH is only set once, in the main file that's first run. It's then in the global scope as other files are included. So all other files just reference it.
Jeremy Falcon

GeneralRe: PHP Pin
David O'Neil6-Oct-14 14:25
professionalDavid O'Neil6-Oct-14 14:25 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 14:36
professionalJeremy Falcon6-Oct-14 14:36 
GeneralRe: PHP Pin
David O'Neil6-Oct-14 15:29
professionalDavid O'Neil6-Oct-14 15:29 
GeneralRe: PHP Pin
Jeremy Falcon7-Oct-14 4:07
professionalJeremy Falcon7-Oct-14 4:07 
GeneralRe: PHP Pin
David O'Neil7-Oct-14 8:25
professionalDavid O'Neil7-Oct-14 8:25 
GeneralRe: PHP Pin
Jeremy Falcon7-Oct-14 9:32
professionalJeremy Falcon7-Oct-14 9:32 
GeneralRe: PHP Pin
Jeremy Falcon7-Oct-14 9:37
professionalJeremy Falcon7-Oct-14 9:37 
GeneralRe: PHP Pin
David O'Neil7-Oct-14 9:48
professionalDavid O'Neil7-Oct-14 9:48 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 10:29
professionalJeremy Falcon6-Oct-14 10:29 
GeneralRe: PHP Pin
Marc Clifton6-Oct-14 10:37
mvaMarc Clifton6-Oct-14 10:37 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 10:44
professionalJeremy Falcon6-Oct-14 10:44 
GeneralRe: PHP Pin
Marc Clifton6-Oct-14 12:38
mvaMarc Clifton6-Oct-14 12:38 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 12:50
professionalJeremy Falcon6-Oct-14 12:50 
GeneralRe: PHP Pin
Marc Clifton6-Oct-14 13:31
mvaMarc Clifton6-Oct-14 13:31 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 13:55
professionalJeremy Falcon6-Oct-14 13:55 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 13:59
professionalJeremy Falcon6-Oct-14 13:59 
GeneralRe: PHP Pin
ed welch6-Oct-14 10:45
ed welch6-Oct-14 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.