0

我有一个打印图像的脚本(来自 mysql DB 的 Blob)。它在 Godaddy 上运行良好,但是当我将其移至英国托管公司时,它无法打印图像 - 而是打印替代文本(其他一切正常)。GD 是 PHP 5.3,英国公司是 PHP 5.2。两个 mysql 数据库都是 5。我检查了脚本是否相同,数据库中有正确的数据等。我现在不知道在哪里看。

该脚本被调用

echo "<img src = 'printimage1.php?recipetableID=$recipetableID'  alt='Picture does not display.'>";

printimage1.php 脚本看起来像

<?php
header("Content-type: image/jpg");
$recipetableID=$_GET['recipetableID'];
include("connect.inc");
$connection = mysql_connect($host,$user,$password)
   or die ("couldn't connect to server");
$db = mysql_select_db($database,$connection)
   or die ("Couldn't select database");  
$query = "SELECT * FROM RecipeTable WHERE recipetableID = '$recipetableID'";   
$result = mysql_query($query)
   or die ("Couldn't execute query.");
   while($row=mysql_fetch_array($result,MYSQL_ASSOC))
   {

        echo $row['Picture1content'];
   }
?>

任何建议表示赞赏。约翰。

4

0 回答 0