为什么opendir打不开当前文件夹下的pic文件夹里的所有图片并且遍历显示?

zairwolf 2003-10-16 10:44:08
$dh=opendir("pic");
while ($imagefile=readdir($dh)) {
if (($imagefile!=".") && ($imagefile!="..") && ($imagefile!="")) echo "<img src=$imagefile>";
}
closedir($dh);
...全文
182 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zairwolf 2003-10-17
  • 打赏
  • 举报
回复
opendir() has been disabled for security reasons in

服务器禁用了opendir函数。那我怎么打开?
xuzuning 2003-10-17
  • 打赏
  • 举报
回复
echo "<img src='pic/$imagefile'>";

21,882

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧