echo "<center>Your file has been uploaded. Upload image preview: </center><br><center><img src='$upfile'></center>"; I use this code, but the picture cannot be displayed
First, make sure the image has been uploaded to a file in the project, such as the Upload file.
Secondly, make sure the $upfile image path is correct.
You can print $ first upfile, for example, the print result is ./Upload/images/xx.png, and then directly <img src='./Upload/images/xx.png'>
If the picture can be displayed, then print it yourself There is a problem with the code in a certain corner. If it cannot be displayed and Tu Qian did upload it, the image path is wrong
What is the variable value in the address in the picture tag? If you copy the variable value directly to the browser, you can see that the picture description address correctly points to the address where the picture is saved in the server. If not, it means the address is wrong. Yes
First, make sure the image has been uploaded to a file in the project, such as the Upload file.
Secondly, make sure the $upfile image path is correct.
You can print $ first upfile, for example, the print result is ./Upload/images/xx.png, and then directly <img src='./Upload/images/xx.png'>
If the picture can be displayed, then print it yourself There is a problem with the code in a certain corner. If it cannot be displayed and Tu Qian did upload it, the image path is wrong
What is the variable value in the address in the picture tag? If you copy the variable value directly to the browser, you can see that the picture description address correctly points to the address where the picture is saved in the server. If not, it means the address is wrong. Yes