homepage Welcome to WebmasterWorld Guest from 54.204.94.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Is a file a directory
andrewsmd




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

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,

 

Receptional Andy




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

Don't forget the PHP manual, andrewsmd ;)

[php.net...]

nick279




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

think there's is_dir / is_file

agreed :) check the manual

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved