这可能是一个非常简单的问题。我在目录/mobile 中工作,并且在目录/uploads 中有照片。
我收到错误消息:
Warning: opendir(http://www.yoozpaper.com/uploads) [function.opendir]: failed to open dir: not implemented in /hermes/bosweb/web088/b881/ipg.yoozpapercom/mobile/sportspage.php on line 313
我将其放入变量 $dir ="http://www.yoozpaper.com/uploads"
对于图像src=$dir/$file
。
请注意,当我处理主目录中的文件时,这是有效的。
对此的任何帮助将不胜感激。
下面的代码:
$dir = "http://www.yoozpaper.com/uploads";
//打开目录
if ($opendir = opendir($dir))
{
//读取目录
while (($file = readdir($opendir)) !==FALSE)
{
if ($file==$imagename)
//可以在下面指定高度和宽度
echo "<img width='75%' height='30%' src='$dir/$file' title='$headline - Yoozpaper News Online' alt='$headline'><br /><br />";