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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.