Error management
| From: | iuhi hkj | Date: | Fri, 26 Oct 2001 09:04:36 +0000 |
| Subject: | Error management | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-72418@lists.php.net to get a copy of this message | ||
How can I know the line and the file from where a function has called. I already know __FILE__ and __LINE__, but I don't want to transmit them in arguments.
Exemple :
------- toto.php -------
1 : include("test.inc")
2 :
3 : test("bidule");
4 :
------------------------
------- test.inc -------
1 : function test($text)
2 : {
3 : print "$text<BR>"; 4 : print __FILE__." - ".__LINE__;5 : } ------------------------ ---- Output ---- bidule test.inc - 4 ---------------- What I want to print is : ---- WANTED ---- bidule toto.php - 3 ---------------- How can I do this ? Thanks for your answers. _________________________________________________________________ Téléchargez MSN Explorer gratuitement à l'adresse http://explorer.msn.fr/intl.asp