PHP: FTP directores and files

Discussion in 'Software' started by man_im_bored, Nov 6, 2005.

Thread Status:
Not open for further replies.
  1. man_im_bored

    man_im_bored Private E-2

    Hey there

    Is there anyway to tell if a "file" is really a file, or if it's a folder. The only way I've been able to do it is if "file" contains a ".", then it's a file, ortherwise it's a folder.

    But obviously with files like error_log, this is not very effective.

    Any ideas? Thanks heaps :)

    Just re-instating that this is using PHP's ftp functions. is_dir() doesn't work (at least to my experience) while using FTP. is_dir() is used when as apart of the file system functions.

    If anyone has found a way to incorporate is_dir() into ftp, then COOL! But I haven't been able too.

    :)
     
  2. Tonglebeak

    Tonglebeak Specialist

  3. man_im_bored

    man_im_bored Private E-2

    Yeah, its better than my work around though, thats for sure!

    Thanks :)
     
Thread Status:
Not open for further replies.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds