Solved

determining php routine name or file name

Posted on 2008-09-29
4
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Cornelia Yoder
ID: 22602111
0
 

Author Comment

by:shafer23
ID: 22602182
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:
Cornelia Yoder earned 500 total points
ID: 22602310
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
ID: 31501430
thanks - that is probably what I will do.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

734 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