我使用php文件在干净的页面中显示图片。我将所有图片添加到网址site.xx/image.php?pic=/xx/xx.jpg
。它工作得很好,并显示图像,但当我用kloxo将我的网站移动到vps时,它停止工作,并且图片不会在php中加载。
示例:
file.php
<?php
$notitle = ""; // Text to Display in No title present
$noimage = "No Image Supplied"; // Error message if no image url
if (file_exists('adbrite.html')) {
$temfile = fopen('adbrite.html', 'r');
$template = fread($temfile, filesize('adbrite.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 TO DICKISM</a>", $template);
} else {
$template = eregi_replace("<PICTURELINK>", "<a href=\"/\">RETURN TO DICKISM</a>", $template);
}
echo $template;
}