Cross Kel Posted March 18, 2009 Share Posted March 18, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/150047-how-often-are-fwrite-and-similar-write-to-file-used/ Share on other sites More sharing options...
Maq Posted March 18, 2009 Share Posted March 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/150047-how-often-are-fwrite-and-similar-write-to-file-used/#findComment-788036 Share on other sites More sharing options...
Zane Posted March 18, 2009 Share Posted March 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/150047-how-often-are-fwrite-and-similar-write-to-file-used/#findComment-788037 Share on other sites More sharing options...
Cross Kel Posted March 18, 2009 Author Share Posted March 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/150047-how-often-are-fwrite-and-similar-write-to-file-used/#findComment-788051 Share on other sites More sharing options...
objN00B Posted March 19, 2009 Share Posted March 19, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/150047-how-often-are-fwrite-and-similar-write-to-file-used/#findComment-788149 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.