When I use an include or require in my php pages and an error occurs, the error is typically: Parse error in file.inc on line 94 ...or something.
The error is not on line 94 in the file.inc! It is usually on 94-(num of lines in file.inc), but it's not very accurate.
Is there a way to prevent this? so that the error message is more correct.
PHP error message is not so true. The error may be on line 94 or after lines. This is bug of PHP.
What about a workaround??
Usually, if it's a parse error, I comment the includes or requires and then get the correct line.
That's a good thing about PHP4 vs. PHP3, that if I do so, none of the other codes will be used.
May be have control-char in the line.you can try to delete the line. and rewrite it.
You need check source after line 94.
Good lucky