Jump to content

is_dir function


Schlo_50

Recommended Posts

Hey guys,

 

Could someone take a look at this and give me a few pointers. Im trying to check whether a folder exists before uploading to it. If it doesn't exist I want to forward the user to another page, else continue upload.

 

$refa = "folder";

 

if is_dir("clients/".$refa."") = false {
	print "<meta http-equiv=\"refresh\" content=\"0;url=http://www.site.com/f.php\">";
	} else {

     $upload = ftp_put($conn_id, $destination_file, $file, FTP_BINARY);  // upload the file
     if (!$upload) {  // check upload status
        print "<meta http-equiv=\"refresh\" content=\"0;url=http://www.site.com/f.php\">";
     } else {
        print "<meta http-equiv=\"refresh\" content=\"0;url=http://www.site.com/a.php\">";
     }

     ftp_close($conn_id); // close
 }
 }

 

Any ideas?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/94718-is_dir-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.