Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

determining php routine name or file name

Posted on 2008-09-29
4
Medium Priority
?
205 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

670 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