Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好我有这个问题,我试图将文件保存到 htdocs 上的目录中,它说权限被拒绝。
<?php $image = file_get_contents('http://www.affiliatewindow.com/logos/1961/logo.gif'); file_put_contents('./images/myFile.gif', $image);
您必须允许将图像插入到 htdocs 中的特定文件夹中的权限,例如在 ubuntu 中
sudo chmod 644 /opt/lampp/hdocs/yourfolder
同样,您必须授予访问该特定文件夹的权限