我可以在C:/ xamp / https / Hospital_DB创建一个目录但是 我想创建一个像http://localhost:8800/Hospital_DB/
这样的目录我的代码目前看起来像
$loc="http://localhost:8800/Hospital_DB/";
$img_location=$loc."scan".date("/Y/n/d/");
if (!file_exists($img_location))
{
mkdir($img_location, 0777, true);
}
答案 0 :(得分:1)
您无法使用网址作为mkdir()
的路径名,您必须使用服务器的driectory结构。例如;
mkdir('/path/to/www/Hospital_DB/', 0777, true);
如果您不知道它是什么,可以尝试使用magic constant __DIR__
来获取它。