I will not upload images. I found the following code on the Internet and found an image on my machine. I can upload the image successfully. I checked that there is an uploadimg folder under my www directory. if this image has just been uploaded successfully, the image has been successfully uploaded and saved in this image all the time... I will not upload images. I found the following code on the Internet and found an image on my machine. I can upload the image successfully. I checked that there is an uploadimg folder under my www directory. if this image has just been uploaded successfully, has it been uploaded successfully? Is this image always saved here? The effect I want is to upload the image to a page and you will see it every time I open this page. what should I do with this image?
; ZwelL Image Upload Program
File Name: ". $ destination_folder. $ fname ."
"; Echo" width: ". $ image_size [0]; echo" Length: ". $ image_size [1]; echo"
Size :". $ file ["size"]. "bytes"; if ($ watermark = 1) {$ iinfo = getimagesize ($ destination, $ iinfo); $ nimage = imagecreatetruecolor ($ image_size [0], $ image_size [1]); $ white = imagecolorallocate ($ nimage, 255,255,255); $ black = imagecolorallocate ($ nimage, 0, 0); $ red = imagecolorallocate ($ nimage,, 0, 0); imagefill ($ nimage, $ white); switch ($ iinfo [2]) {case 1: $ simage = imagecreatefromgif ($ destination); break; case 2: $ simage = imagecreatefromjpeg ($ destination); break; case 3: $ simage = imagecreatefrompng ($ destination); break; case 6: $ simage = imagecreatefromwbmp ($ destination ); break; default: die ("unsupported file types"); exit;} imagecopy ($ nimage, $ simage, 0, 0, 0, $ image_size [0], $ image_size [1]); imagefilledrectangle ($ nimage, 1, $ image_size [1]-15, 80, $ image_size [1], $ white); switch ($ watertype) {case 1: // Add the watermark string imagestring ($ nimage, 2, 3, $ image_size [1]-15, $ waterstring, $ black); break; case 2: // watermark image $ simage1 = imagecreatefromgif ("xplore.gif"); imagecopy ($ nimage, $ simage1,); imagedestroy ($ simage1); break ;} switch ($ iinfo [2]) {case 1: // imagegif ($ nimage, $ destination); imagejpeg ($ nimage, $ destination); break; case 2: imagejpeg ($ nimage, $ destination); break; case 3: imagepng ($ nimage, $ destination); break; case 6: imagewbmp ($ nimage, $ destination ); // imagejpeg ($ nimage, $ destination); break;} // overwrite the original uploaded file imagedestroy ($ nimage); imagedestroy ($ simage );} if ($ imgpreview = 1) {echo"
Image preview:
"; Echo" ";}}?>
Reply content:
I will not upload images. I found the following code on the Internet and found an image on my machine. I can upload the image successfully. I checked that there is an uploadimg folder under my www directory. if this image has just been uploaded successfully, has it been uploaded successfully? Is this image always saved here? The effect I want is to upload the image to a page and you will see it every time I open this page. what should I do with this image?
; ZwelL Image Upload Program
File Name: ". $ destination_folder. $ fname ."
"; Echo" width: ". $ image_size [0]; echo" Length: ". $ image_size [1]; echo"
Size :". $ file ["size"]. "bytes"; if ($ watermark = 1) {$ iinfo = getimagesize ($ destination, $ iinfo); $ nimage = imagecreatetruecolor ($ image_size [0], $ image_size [1]); $ white = imagecolorallocate ($ nimage, 255,255,255); $ black = imagecolorallocate ($ nimage, 0, 0); $ red = imagecolorallocate ($ nimage,, 0, 0); imagefill ($ nimage, $ white); switch ($ iinfo [2]) {case 1: $ simage = imagecreatefromgif ($ destination); break; case 2: $ simage = imagecreatefromjpeg ($ destination); break; case 3: $ simage = imagecreatefrompng ($ destination); break; case 6: $ simage = imagecreatefromwbmp ($ destination ); break; default: die ("unsupported file types"); exit;} imagecopy ($ nimage, $ simage, 0, 0, 0, $ image_size [0], $ image_size [1]); imagefilledrectangle ($ nimage, 1, $ image_size [1]-15, 80, $ image_size [1], $ white); switch ($ watertype) {case 1: // Add the watermark string imagestring ($ nimage, 2, 3, $ image_size [1]-15, $ waterstring, $ black); break; case 2: // watermark image $ simage1 = imagecreatefromgif ("xplore.gif"); imagecopy ($ nimage, $ simage1,); imagedestroy ($ simage1); break ;} switch ($ iinfo [2]) {case 1: // imagegif ($ nimage, $ destination); imagejpeg ($ nimage, $ destination); break; case 2: imagejpeg ($ nimage, $ destination); break; case 3: imagepng ($ nimage, $ destination); break; case 6: imagewbmp ($ nimage, $ destination ); // imagejpeg ($ nimage, $ destination); break;} // overwrite the original uploaded file imagedestroy ($ nimage); imagedestroy ($ simage );} if ($ imgpreview = 1) {echo"
Image preview:
"; Echo" ";}}?>
Upload images to the server... Reference the relative address of the server image on the page...
This is relatively basic
The upstairs is right. Just reference the relative path of this image on the server. The server is case sensitive.
Upstairs is correct.
At the end of the server, use $ _ FILES to view the file information.
If empty ($ _ FILES) is true, no FILES exist. Otherwise, the FILES are successfully uploaded. Dump.