Opendir error; No such file or directory found

亡梦爱人 提交于 2019-12-05 14:26:38

You have to understand the difference between a filesystem and an HTTP daemon.
Although they have somewhat similar appearance, it is absolutely different matters.

To use opendir, you have to open *a directory, not HTTP resource.

opendir('../uploads');

should work

opendir($_SERVER['DOCUMENT_ROOT'].'/uploads');

would be better as it will always point to the uploads directory, no matter from where you called it.

http://www.yoozpaper.com/uploads us a URL not a directory. You can't access it using opendir. You need the system path to it for example "/home/user/public_html/uploads" or something. Get the path to the directory using your file manager or control panel

It might "/hermes/bosweb/web088/b881/" in your case. m not sure though. In any case, get the local path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!