Skip to content

Tag: fopen

PHP file handling read and write

I am trying to figure out how the file handling works, the thread says: Your task is to write a PHP script, which reads grades from the file “grades.txt”, raises all of them by one, writes the raised grades into the file “results.txt”, and finally prints the raised grades from the file…

Why doesn’t PHP 7.2 fopen(/tmp, a) write to the file?

I have an old “PHPDBG” function that lets me “printf” to a text file. I’ve had PHPDBG.inc “since forever” (at least since PHP 4.x days), but it doesn’t seem to be working in my current configuration (ubuntu18, Apache 2.4.29 and PHP 7.2). Specifically: I can&#821…

PHP, Date() and fopen

I have an error system that take the date() and the error and insert it into a file: My problem: for start at the fopen at the second parameter I need the pointer to be at the start and that looked at the manual and I need the parameter to be writing only, put the pointer at the start and