I have one php file "test.php" which have below code
$file = fopen("../testwrite.php","w");
echo fwrite($file,"<h1>this is for testing</h1>");
fclose($file);
now I have one more php file named original.php in which I have included test.php. But when I run original.php then fwrite function have no affect. "testwrite.php" is not writing.
but if I direct run test.php then it is working and testwrite.php will write but content.
content of original.php is below,
<?php include_once 'test.php';
// other process ?>
So what is issue here?