dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
36

Steve
I know your IP address

join:2001-03-10
Tustin, CA

Steve to MVS

to MVS

Re: PHP: file_exists fails to work or pebkac?

Instead of:
$tempPage = dirname(__FILE__) . '../content/' . basename($tempPage) . '.php';
 
maybe use
$tempPage = dirname(__FILE__) . '/../content/' . basename($tempPage) . '.php';
 
to put a / between the dirname and dot-dot-content.

To the OP: please indent your code so we can read it.

MVS
Premium Member
join:2005-04-18

MVS

Premium Member

Oops! Thanks for catching that. It's been a long day...

Ashke
Flips page and continues reading
Premium Member
join:2007-09-11
Minneapolis, MN

Ashke

Premium Member

said by MVS:

Oops! Thanks for catching that. It's been a long day...

It's all good
Ashke

Ashke to Steve

Premium Member

to Steve
And also to MVS See Profile,

I tried using the codes below...
$tempPage = dirname(__FILE__) . '../content/' . basename($tempPage) . '.php';
 

and
$tempPage = dirname(__FILE__) . '/../content/' . basename($tempPage) . '.php';
 

Unfortunately, nothing works :(
Ashke

Ashke to Steve

Premium Member

to Steve
said by Steve:

To the OP: please indent your code so we can read it.

Done... indented all of the block quotes in previous posts.