+ 1
php fopen()
why i got "warning: fopen(text.txt):failed to open stream: permission denied in/opt/lampp/htdocs/file.php on line 23" ?
4 Réponses
+ 2
you have to change the permission of your directory to accessible to you
you need to have write permission
if you are using linux
just run this command on terminal
open your local server directory open it with terminal
sudo chmod -R 777 (directory name)
chmod will change the file mode(permission) 777 will give writing and reading permission for users
incase you are using windows just google search how to change file permission in windows
then you are free to go
hope this will help😉😉
+ 2
ah, thanks @Emyas. it work me 😄. i'm using linux and run chmod like you write 👍
+ 2
Am glade it worked
+ 1
Because your user doesn't have permissions to open that file on your system. It is probably in a location that doesn't allow the user to modify/open files such as in your system files. Copy or move the file(s) to a user accessible location or change the permissions to those file(s) or the directory to allow your user read/write access.