fwrite () file not writable???? Plz help :-(

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

fwrite () file not writable???? Plz help :-(

Post by Chris Corbyn »

Hi,

I'm just starting out experimenting with the fwrite function since I need a quick way to update some of the files regularly on my server.

When I try to write to any file I specify I get the response that the file is not writable.

How can a make a file writable?

I'm using fopen() with the 'a' paramater at the moment does this make a difference. It's probably just a simple case of changing the permissions somehow so any help would be much appreciated.

Please note: If I need to set the permissions on the server itself, I am using my university server so cannot change their settings (only upload files etc).

Kind regards :-)
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Yeah you need to chmod the file so that php has write access to it, you can do this via ftp or ssh - which ever access you have, so you shouldnt have a problem changing it.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Nice one cheers!

Never used chmod but I'm just reading on it now and looks obvious enough.

Thanks for prompt reply.
Post Reply