0

我使用 php 文件在干净的页面中显示图片。我将 url 添加到所有图片中site.xx/image.php?pic=/xx/xx.jpg。它运行良好并显示图像,但是当我使用 kloxo 将我的网站移动到 vps 时,它停止工作并且图片不会加载到 php.ini 文件中。

例子:

文件.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;
}
4

0 回答 0