Skip to content
Advertisement

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 “results.txt”. If a grade is 5, it won’t

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’t open the file ($fp is null) … /tmp/PHPDBG.txt never gets created (because of the fopen

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

Using fopen and str_replace to auto fill a select option

I have this file ‘gardens.php’, which pulls data from a table called ‘generalinfo’ and I use fopen to send that data to a file called ‘index.html’. Here is the issue, only one option is filled. I have a demo running here Garden Demo <– this is a new updated page and location, there are more errors than I have locally

Advertisement