A
Anonymous
Guest
Why don't you just use a regular copy process ? :?
$source_file (Its the the uploading input)
$source_file (Its the the uploading input)
Code:
<?
$path="path to directory";
$max_size=1000000;
$source_file_size_kb=(int)($source_file_size/1000);
if(is_uploaded_file($source_file)){
if($source_file_size>$max_size){
print "<font color=red><b>ERROR</b>:</font> The File's Size Is More Then <b>1Mb</b>!<br>"; exit;}
if($source_file_type=="text/html" || $source_file_type=="application/octet-stream"){
print "<font color=red><b>ERROR</b>:</font> You Are <b>Not</b> Allowed To Upload This Type Of File!<br><br>"; exit;}
$do=copy($source_file, $path . $source_file_name);
if($do){
print "<font color=red><b>Name</b>:</font> $source_file_name<br>";
print "<font color=red><b>URL</b>:</font> $http://.../$source_file_name<br>";
print "<font color=red><b>Size</b>:</font> $source_file_size_kb KB <br>";
print "<font color=red><b>Type</b>:</font> $source_file_type<br><br>";
if($source_file_type=="image/gif" || $source_file_type=="image/jpg" || $source_file_type=="image/jpeg" || $source_file_type=="image/bmp"){
print "<u><b>Picture Preview</b></u><br><br>";
print "<img border=0 src=http://.../$source_file_name><br><br><br>";
}
}
elseif(!$do){
print "<font color=red><b>ERROR</b>:</font> Uploading Failed! Please Try Again Or Email The <b>Webmaster</b>.<br><br>";
}
}
?>