我想在 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;
}
?>
如果有人可以提供帮助,那就太好了,谢谢!