Filename of script that instantiates an object
Posted
by Calvin L
on Stack Overflow
See other posts from Stack Overflow
or by Calvin L
Published on 2010-04-21T09:39:37Z
Indexed on
2010/04/21
9:43 UTC
Read the original article
Hit count: 241
php
In PHP, is it possible to get the file name of the script that instantiated an object?
For example I have a script called file.php that creates a new instance of class Class. The class has an Error object that, when triggered, returns some error information. I would like to show that file.php triggered the error.
© Stack Overflow or respective owner