code 1;
if($upload)
{
$path ="/var/www/html/photo";
// copying image
copy($image,$path.$image);
$name = $image;
$name.=".jpg";
echo $image."<br>";
echo $name;
rename("/var/www/html/photo/$image","/var/www/html/photo/$image_name");
}
?>
code 2;
if($upload)
{
if(!file_exists("photo/$image_name"))
{
$ss=copy("$aa" ,"photo/$image_name");
// if($ss)
echo "success!";
}
}
?>
I upload my image use these code from windows to linux, and display success,but the image coudn't display, if I download from the server ,I can display the image,when I edit the image with the firework,the soft told me "could not open the file,unknow the file type!"