How to check if fwrite failed php code example
Example: How to check if fwrite failed php
fOpen("TestFile.txt", "w+");
if(fwrite("Test data") === false){
echo("Data writing failed.");
}else{
echo("Data writing successfull.");
}
fclose();
fOpen("TestFile.txt", "w+");
if(fwrite("Test data") === false){
echo("Data writing failed.");
}else{
echo("Data writing successfull.");
}
fclose();