Welcome to WebmasterWorld Guest from 54.144.243.34

Forum Moderators: coopster & jatar k

Is a file a directory

   
2:30 pm on Oct 13, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I have a program that moves/renames files based on a search text inputted by the user. Is there a function that checks to see if a path is a directory and not a file. This is the logic I'm looking for

if(the path given is a file and not a folder){

do some code;

}
else{

do some code;

}
Thanks,

2:32 pm on Oct 13, 2008 (gmt 0)



Don't forget the PHP manual, andrewsmd ;)

[php.net...]

8:19 pm on Oct 13, 2008 (gmt 0)

5+ Year Member



think there's is_dir / is_file

agreed :) check the manual

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month