error message 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
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

error message help

Post by fresh »

hey,

I have been getting this error message a lot lately and I have no idea what it means or how I could fix it, here it is:
Warning: fopen(http://blah.com/winners/win09.txt): failed to open stream: HTTP wrapper does not support writeable connections. in /home/blah/public_html/members/crychal3.php on line 23
Thanks in advance :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can't write to a url file.
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

Post by fresh »

so do I have to make the txt file in the same dir as the php file??
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

No, you just have to access it via "../../file.txt" instead of site.com/file.txt

etc
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

since it looks like the file is on your server, fopen it with local paths.. then, given the proper permissions, you can write to it.
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

Post by fresh »

oh.. alright, thanks alot :)
Post Reply