[PHP] Error management
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"; 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Error management
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"; 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]