I have a dynamic resizing image script that gets the location of the image to 开发者_开发知识库be resized-on-the-fly from a GET variable.
How can I limit the script so that it ONLY works if a local image is passed?
Thanks!
Check if the file exists on your hard disk:
if (file_exists($myImageDir . '/' . $_GET["image_url"])) processImage();
Don't forget to cleanup any GET or POST vars before using in your code.
精彩评论