我想做的事情在PHP加载图片
以下我有一个目录中的图片,我需要使用装载在一个PHP文件干净的页面的图片"site.com/image.php?pic=xx/xx.jpg"
例子:http://freeminecraftaccount.org/image.php?pic=images/minecraft.jpg
if (file_exists('image.html')) {
$temfile = fopen('image.html', 'r');
$template = fread($temfile, filesize('image.html'));
if ($title) {
$template = eregi_replace("<PICTURETITLE>", $title, $template);
} else {
$template = eregi_replace("<PICTURETITLE>", $notitle, $template);
}
if ($desc) {
$template = eregi_replace("<PICTUREDESCRIPTION>", $desc, $template);
}
if ($pic) {
$template = eregi_replace("<PICTURE>", "src=\"$pic\">", $template);
} else {
$template = eregi_replace("<PICTURE>", $noimage, $template);
}
if ($return) {
$template = eregi_replace("<PICTURELINK>", "<a href=\"$return\">RETURN</a>", $template);
} else {
$template = eregi_replace("<PICTURELINK>", "<a href=\"/\">RETURN</a>", $template);
}
echo $template;
}
?>
如果有人能帮到,那太好了 谢谢!
[你尝试过什么(http://www.whathaveyoutried.com )?你还需要更多的细节。有许多方法可以使用'$ _GET'在PHP中加载图像 – UnholyRanger 2013-03-08 19:07:45