請問上傳圖片的問題



贊助商連結


alyoou
2003-03-08, 05:24 PM
請問一下...我從國外網站上看到一篇上傳圖片的PHP教學..
但我run程式時卻出現了這樣的錯誤...
[08-Mar-2003 16:52:15] PHP Fatal error: Failed opening required 'disclaimer' (include_path='.;c:\php4\pear') in c:\php\www\files\index.php on line 28
請問disclaimer是代表什麼呢...以下是index.php
<html>
<head>
<title>上傳相片</title>
</head>
<body bgcolor="white">

<?php
include 'db.inc';

$query = "SELECT id, shortName, mimeName FROM $cfg_files";

if (!($connection = @ mysql_pconnect($hostName,
$username,
$password)))
showerror();

if (!mysql_select_db("$db", $connection))
showerror();

if (!($result = @ mysql_query ($query, $connection)))
showerror();
?>
<h1>Image database</h1>

<h3>Click <a href="insert.php">here</a> to
upload an image.</h3>
<?php
require 'disclaimer'; <----------here

if ($row = @ mysql_fetch_array($result))
{
?>

<table>
<col span="1" align="right">
<tr>
<th>Short description</th>
<th>File type</th>
<th>Image</th>

</tr>
<?php
do
{
?>
<tr>
<td><?php echo "{$row["shortName"]}";?></td>
<td><?php echo "{$row["mimeName"]}";?></td>
<td><?php echo "<img src=\"view.php?file={$row["id"]}\">";?></td>
</tr>
<?php
} while ($row = @ mysql_fetch_array($result));
?>
</table>
<?php
} // if mysql_fetch_array()
else
echo "<h3>沒有相片</h3>\n";
?>
</body>
</html>
跟php.ini有關係嗎??
請各位前輩們教教我...謝謝喔...