How can I hide the image path? Hide the real path in the source code of the webpage, but click the link to open it on the new page.
Write the following statement:
$ _ F = readfile ($ _ p); header ("Content-type: image/*"); echo $ _ f;
Click the src path in the source code. the php file is downloaded.
Reply to discussion (solution)
Url rewrite
Url rewrite
The server cannot be moved.
However, RewriteRule can be used.
I don't think you can do this without modifying the server or hiding the img path from the source code ....
I don't think you can do this without modifying the server or hiding the img path from the source code ....
No .. I mean, I cannot change the server configuration. You can use it later, and it will not Download php.
Before sending the output image, there cannot be any echo, even if it is echo '', an error will occur. So all of them are replaced by redirection to the 404 page.
Url rewrite
The server cannot be moved.
Then you change the header ("Content-type: image/*"); in your code to the specific image type, and this method is called before all outputs.