I want to make a PHP page with the Find image function, with id=xx,php in the URL to get the ID value with get. If a picture with the same file name and ID is found, it displays "Load.gif" if it is not found. I am pure novice, referring to the example of the Internet to write a paragraph, but there is no way to display pictures. Please guide the experts.
The code is as follows:
Reply to discussion (solution)
ReadFile read the picture read the binary bar
Echo ';
You can display the pictures on the Web page.
$filename = "/' $id '. gif";
Why do you want price quotes?
$filename = "/$id. gif";
Also: remove echo, remove BOM header
Then there is, you are not likely to put the picture on the root of the filesystem?
I want to make a PHP page with the Find image function, with id=xx,php in the URL to get the ID value with get. If a picture with the same file name and ID is found, it displays "Load.gif" if it is not found. I am pure novice, referring to the example of the Internet to write a paragraph, but there is no way to display pictures. Please guide the experts.
The code is as follows:
Wrote a demo to see.
$id = Isset ($_get[' id ')? $_get[' id ']: 0; $filename = intval ($id). ". GIF "; if (file_exists ($filename)) { echo";} else{ echo ';}
Thank you very much, the problem has been solved smoothly. The original wrong so outrageous, ashamed. Incidentally, $id = Isset ($_get[' id ")? $_get[' id ': 0; What do you mean?
Thank you very much, the problem has been solved smoothly. The original wrong so outrageous, ashamed. Incidentally, $id = Isset ($_get[' id ")? $_get[' id ': 0; What do you mean?
Isset detect if the variable is set
Trinocular operation, if set, execute? The following, if not on the execution: the back of the
Thank you very much, the problem has been solved smoothly. The original wrong so outrageous, ashamed. Incidentally, $id = Isset ($_get[' id ")? $_get[' id ': 0; What do you mean?
Isset detect if the variable is set
Trinocular operation, if set, execute? The following, if not on the execution: the back of the
Thanks for the answer! Thank you!