Solved

determining php routine name or file name

Posted on 2008-09-29
4
197 Views
Last Modified: 2012-05-05
Hi -

Question, I am inserting some error handling.  If a query creates an error, I would like to log the name of the routine or perhaps the corresponding php filename.

Is this possible?  if so, what is the command to get the routine name or the php filename?

Thanks.

Pete
0
Comment
Question by:shafer23
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:yodercm
Comment Utility
0
 

Author Comment

by:shafer23
Comment Utility
Hi thanks - that returned the name of the index file, but what I was trying to get is the name of a php file that is referenced by that index file (i.e. a file that does not appear within the url).  Maybe that is not possible???

Pete
0
 
LVL 27

Accepted Solution

by:
yodercm earned 500 total points
Comment Utility
I'm not sure what you mean by the "index file", but look through the environmental values that you can get here:
http://hoohoo.ncsa.uiuc.edu/cgi/env.html
and see if any of them are what you want.

If not, it's possible to just put a variable such as $scriptname='whatever.php' into each script, so the error routine can use it.
0
 

Author Closing Comment

by:shafer23
Comment Utility
thanks - that is probably what I will do.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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