Jump to content

[SOLVED] Determining the line of code?


bobleny

Recommended Posts

Is there a way to determine the line a piece of code is on?

 

This is a little difficult to explain....

 

I've sorta worked out an error system.... UH.. Did I loose you yet? This is script will tell me if the query fails. If I am not the one who gets the error message, then I won't know about the problem....

 

if(!$query)
{
$_SESSION['error_message'] = mysql_error();
$_SESSION['error_location'] = "Page: " . $page . " - Line: 249";
mysql_close();
sendem(error, .1);
die();
}

 

You will notice the "Line: 249". Well, as I edit the page and add new things the line that it is on will not be accurate. I need a variable of some sort that will tell me what line it is on, with out me constantly changing the number.

 

Do you understand yet? I hope so...

 

So, how can I do this?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/39261-solved-determining-the-line-of-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.