【发布时间】:2012-02-27 16:26:07
【问题描述】:
这可能是一个非常简单的问题。我在 /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 />";
【问题讨论】: