Click here to Skip to main content
15,904,877 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 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 
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 
I will post it here, then.

What you said has left me in a state of confusion. To simplify my case, say the landing page is at www.randommonkeyworks.com/landing.php, which is at [serverSpecificStuff]/home/user/public_html. This is what BASE_PATH will become because of the PHP declaration.

The main file included by that landing page is one subdirectory up, at [serverSpecificStuff]/home/user/, so it is hidden from the outside world, non-public. You've indicated I don't need to use the .. relative path inclusion technique like BASE_PATH . "..\hidden1.php" to get to it, but I can't see how that is possible because BASE_PATH points to the user subdirectory, not the home subdirectory.

Additionally, the hidden1.php includes 4 more files, say they are numbered 2 through 5. They are also at the home subdirectory, non-public. Therefore, unless PHP and the server are smart enough to expand the environment (or whatever magic is being done) to include the home subdirectory because it had to look for hidden1.php there, doesn't the hidden1.php file also need to include 2 - 5 as relative to the BASE_PATH, i.e., require_once (BASE_PATH . "..\hidden2.php");, and the same for the other three files?

Unless, maybe I added another line to the PHP:
PHP
define('HIDDEN_PATH', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "..\");

(if that is the way to do it in PHP, which it probably isn't with my luck) in the landing.php file, and used that path for all includes everywhere. Perhaps that is what you were getting at, but just overlooked the fact that all the included files were not in BASE_PATH.

Many thanks for the time and trouble!
David O'Neil

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 
GeneralRe: PHP Pin
DaveX866-Oct-14 13:52
DaveX866-Oct-14 13:52 
GeneralI like the CP slot machine Pin
CDP18026-Oct-14 9:26
CDP18026-Oct-14 9:26 
JokeRe: I like the CP slot machine PinPopular
Chris Maunder6-Oct-14 9:34
cofounderChris Maunder6-Oct-14 9:34 
GeneralRe: I like the CP slot machine Pin
CDP18026-Oct-14 9:37
CDP18026-Oct-14 9:37 
GeneralRe: I like the CP slot machine Pin
Chris Maunder6-Oct-14 10:06
cofounderChris Maunder6-Oct-14 10:06 

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.