Page 1 of 1
if (is_dir("$link/index.php"))
Posted: Tue Oct 25, 2011 2:51 pm
by Jackount
I have this in my code. The $link variable is initialized in the start of the script:
from a html document:
Code: Select all
<input id="textbarNewurl" type="text" name="link" size="30" maxlength="60" />
inside a form calling the php script. all under control, I'm sure.
The is_dir function is supposed to check whether there is a index page in the folder with the name of whatever the user has inputted. It does not do that??? What have I done wrong?
When I check in explorer, there IS a index.php file in that folder.
Thanks in purpose.
Re: if (is_dir("$link/index.php"))
Posted: Tue Oct 25, 2011 3:13 pm
by Celauran
Jackount wrote:The is_dir function is supposed to check whether there is a index page in the folder with the name of whatever the user has inputted.
No it isn't.
Re: if (is_dir("$link/index.php"))
Posted: Tue Oct 25, 2011 3:22 pm
by egg82
in short, checking for index.php will always return false
this, however...
Re: if (is_dir("$link/index.php"))
Posted: Tue Oct 25, 2011 4:24 pm
by Jackount
lol... must've misunderstood the php.net manual for is_dir... thanks!