Jump to content

File write help


Gunnar J

Recommended Posts

What's wrong is that you don't know how to debug. There are only 5 lines in that script, you know (at least) one of them is the problem. You need to look at each line and if you don't know what something is doing, look it up on php.net. If you don't know how to use fwrite, look it up. No one here knows everything, when we have a question we look it up. Check each line, make sure you know what it's doing and that it makes sense, and check it for syntax errors. In those 5 lines there are at least 3 errors.

Link to comment
Share on other sites

My friend the ninja is correct as usual, even if he does have the social skills of a snail. :) I'll give you 2 hints. First, built-functions pretty much always require an argument to be passed inside parentheses.2. When you're debugging, a helpful strategy is to "comment out" sections of your code in an attempt to locate the broken line(s). Temporarily echoing a return value can also help. (But only if you actually assign return values to a variable.) Since your code is just 5 lines long, I'd comment out the last four lines and see if line one works or breaks. When you get it working, uncomment line two and do the same. Etc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...