我能列出已保存在服務器上傳文件夾中的圖像,但我不確定發佈圖像時發生了什麼問題。我可以列出文件的名稱,但無法顯示圖像。在使用php在我的網站上發佈圖像時遇到問題
代碼:
<?php
if ($handle = opendir('/home/kevin/html/uploads')) {
echo "Directory handle: $handle\n";
echo "Entries:"."<br>";
while (false !== ($entry = readdir($handle))) {
//echo "$entry"."<br>";
echo "<img src = "$entry" alt = " ">"."<br>"
}
closedir($handle);
}
?>
缺少'.'連接運算符 – Ghost 2014-09-02 02:42:48