Jump to content

Recommended Posts

As the topic asks, how often have the more experienced PHP devs used fwrite and its similar write-to-file kin? I ask as the teacher I have right now will be spending the next three weeks, roughly 18 hours of class time, covering nothing but how to write to and read from text files.

 

None of us (the students) feel this is an appropriate use of time, but since we don't really know much about PHP yet, we aren't exactly the best judges for this sort of thing. Even so, it just doesn't feel right to us that we will be spending almost a quarter of the semester covering how to read and write to and from text files when none of us had heard of any such usage of PHP before.

 

Also, this isn't dealing with reading and writing with databases, it is simply text files (we clarified that with the teacher almost immediately).

 

Is this something that is an important part of your day-to-day usage of PHP? If not, how often have you found yourself using it?

I ask as the teacher I have right now will be spending the next three weeks, roughly 18 hours of class time, covering nothing but how to write to and read from text files.

 

I don't know what you could learn that would take 18 hours...

 

I mean it's not a waste of time to learn this, but 18 hours seems way too long.

I hardly ever find myself using any of the file read/write functions. I probably use the directory functions more than the file functions...like glob.

 

But really, it won't hurt you to learn how to use those functions if you don't know PHP well. You don't want to dive straight into databases. There are tons of PHP errors and notices and fatal warnings that you need to get used to before you can get comfortable mingling SQL in there too. I'd say file reading/writing is a good practice. You can at least make flat file databases if anything. You can also use RegEx to filter through it even more.

There are tons of PHP errors and notices and fatal warnings that you need to get used to before you can get comfortable mingling SQL in there too.  I'd say file reading/writing is a good practice.

Perhaps that is his reasoning for it. The amount of time still seems like it is a bit much, but I'll give him the benefit of the doubt.

 

Thank you.

I'm positive a lot of other built-in PHP functions will be

discussed and used along with the file manipulation functions.

 

It's a subject in PHP that will allow you to utilize a lot of the

core structure of programing logic and learning the PHP syntax

without having to write xHTML, learn SQL or DBMS technologies,

while still allowing you to create a readable output.

 

Once you learn the core concepts and syntax, there is nothing

you cannot apply your knowledge to with a little help from a

reference book  8)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.