SoberDude Posted June 18, 2009 Share Posted June 18, 2009 Everytime an error occurs on my website, it displays the line number which it occurred on. However, using PHP, I include files, some of which have JavaScript in them. Look here: <?php include("file_with_javascript.php"); //php code here ?> <script type='text/javascript'> //javascript code here </script> <?php //more php code here ?> If the file "file_with_javascript.php" has 15 lines of JavaScript in it, and an error occurs on the code above (let's say line 11; including all the PHP code), it will say that the error occurred, for example, on line 17 or something similar. Meaning, unlike PHP errors, it doesn't tell you the actual line in the file that the error occurred on. Any way around this? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted June 18, 2009 Share Posted June 18, 2009 Yes! Don't write buggy code. Anyway, most debug consoles like Firebug can tell you. Quote Link to comment Share on other sites More sharing options...
SoberDude Posted June 18, 2009 Author Share Posted June 18, 2009 Haha. xD Last time I checked, Firebug doesn't tell you the line it actually occurred on in that specific file. o.o Edit: apparently if you view the source, you can find the correct lines. o-o Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.