Hey guys, so I need the command that checks if a folder exists, not a file.. I could use if(file_exists(index.php)) and put an index in each file, but they might not have an index file in it...
I googled it and searched PHP.net. I hate posting bulletins for such little issues, but I need to solve this before tomorrow
if dir exist command?
Started by phpforfun, Feb 17 2008 02:13 PM
4 replies to this topic
#1
Posted 17 February 2008 - 02:13 PM
|
|
|
#2
Posted 17 February 2008 - 02:20 PM
oh man, I just found out you can use the file_exists for a folder too... Im sorry guys. Pointless thread.
Admins delete?
Admins delete?
#3
Guest_Jaan_*
Posted 17 February 2008 - 02:46 PM
Guest_Jaan_*
you can use this also:
$dir = "images";
if(is_dir($dir)){
echo "It is a directory!";
}else{
echo "It is not a directory!";
}
#4
Posted 17 February 2008 - 07:04 PM
Awesome, I guess I did learn something! Thanks!
#5
Guest_Jaan_*
Posted 17 February 2008 - 09:38 PM
Guest_Jaan_*
hehe.. that's great :)


Sign In
Create Account


Back to top









