hi i am creating a file upload script which will upload , insert into the db
and then ftp the file to a suitable server , depending on the file size
limit and how much space is left on the server , how could i check if the
filesize is between a range of values for the servers and choose the right
one
$filesize = round($file->getProp('size')/1000); //uploaded filesize
while ($servers = $result2->fetchRow(DB_FETCHMODE_ASSOC,$i++)) {
$file_limit = $servers["file_limit"];
$ftpserver = $servers["server"];
if ($filesize < $file_limit) { echo "$ftpserver<br>$file_limit<br>";}
//else if (($filesize > $file_limit) and ($filesize < 1000)) {echo
"$ftpserver<br>$file_limit";}
//else if ($filesize > $file_limit) { echo
"$ftpserver<br>$file_limit<br>";}
}
i am using this within an upload loop to upload each file , i dont think its
right though
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php