The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

My first try with manipulating any kind of flat files... I've always used databases. But here was my first shot... because I don't need a database for one text file that's going to change like i once a week.

This file is called update.php and also sits in the /sixgunner/ directory. All permissions are set properly. I get this error:

Code:

Warning: Supplied argument is not a valid File-Handle resource in /home2/bullets/beartoothbullets-www/sixgunner/update.php on line 8
Warning: Supplied argument is not a valid File-Handle resource in /home2/bullets/beartoothbullets-www/sixgunner/update.php on line 9

Any Ideas? I copied my entire code so you can see it... in it's entirity.

God Bless, and thanx!

Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

I hope you are sitting down - you are either going to laugh or cry over this one:

$fd = fopen($filename, "w");
fwrite($fp, "$contents");
fclose($fp);

$fd != $fp

May I suggest that you use more meainingful variable names
(I know I tend to slip into the habbit of using things like $x -
but - plain English variable names do tend to help readability
and understandability of code. This also makes errors more obvious.

thanx

I figured that out about 2:30 last night! And I almost cried... well, I did, I cried to my host... what's wrong with your PHP version, what idiot set this up.. etc... I sent them an appology... man, I'm still laughing!

Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.