like in Visual Basic, u can have this code:
Code: Select all
On error goto errhandler 'On error goto errhandler
goto part 'Goto part
Exit Sub
part:
'This is were something will be done
Exit sub
errhandler:
msgbox "Error.....bla bla bla"
Exit Subbecuase i've created a function that opens a file, reads from it, and the closes it etc.
But if there is an error;
Code: Select all
<?php
@fwrite ($fp, $newcontent) or [*inputsomething here*];
?>