我用下面的代碼的其他網址的圖像保存到我的文件夾file_put_contents(d: XAMPP htdocs中 TOH條碼 PUBLIC 上傳條形碼):未能打開流:權限被拒絕
<?php
$string = "https://eandata.com/.../products/000/000/0000000000000.jpg";
$img = public_path('uploads\barcode');
file_put_contents($img, file_get_contents($string));
?
它報告錯誤:「file_put_contents(D:\ xampp \ htdocs \ toh-barcode \ public \ uploads \ barcode):無法打開流:拒絕權限。」 如何修復錯誤。感謝所有
錯誤解釋本身。爲該文件設置寫入權限。 – urfusion
您的網絡服務器是否有權寫入該文件夾? – Jerodev
如何設置目錄的權限? –