Solved

Display actual error in code....?

Posted on 2006-07-24
5
180 Views
Last Modified: 2011-09-20
Hi all,
Is there anyway to have PHP display the actual line of code causing problems, rather than just a line number?

0
Comment
Question by:fox_statton
5 Comments
 
LVL 5

Accepted Solution

by:
floorman67 earned 250 total points
ID: 17167795
no php wont do that for you via script, but the error code and line nubmber help you ALOT in tracking down the problem.

it is easy to find the line number with any script editor that segments and lists the code line number by line number.

I use Web Builder 2005 ... http://www.blumentals.net/webuilder/

they have a free trial you can test out.

I am sure there are free ons around that do the same thing or similar.

0
 
LVL 29

Assisted Solution

by:TeRReF
TeRReF earned 250 total points
ID: 17168128
You could use debug_backtrace() to provide you with extra information. You can add it in a trigger_error() event.
http://php.net/debug_backtrace
http://php.net/trigger_error
0
 
LVL 12

Expert Comment

by:AmigoJack
ID: 17168548
oh please... have you ever considered pressing CTRL+G in notepad/editor?

more helpful could only be self-healing-php-scripts ;-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now