I have a class, with a method that accepts 2 parameters. I would like to output error messages.
So, lets say a new file is created, and my class is used in that file. We will call that file test.php lets say they use this method with two parameters on line 105 but... they forget to add the second parameter. I currently display this message:
print("<p><b>Warning:</b> Class <b>" . __class__ . "</b> requires 2 parameters, 1 given.</p>");
Warning: Class ClassName requires 2 parameters, 1 given.
I would like to change it to also include the file name and the line number, so the final result would look like this:
Warning: Class ClassName requires 2 parameters, 1 given in /home/user/www/test.php on line 105.
How can I get the file name and line number from within the class? Is it possible?
Hyperlink in PHP to MySQL record
Hello,I am having trouble as i am new to php. I have connected to the database and I have displayed the fields i want on my page. I need to access certain fields by links to each letter.For example A
Not capturing all the information we require in the form.......
Hi Guys,I was wondering if you would share some more of your knowledge today, I'm hoping it will be quite a simple answer for you but one that is boggling us here! ;-)We have an html form that users
First root of a number
Hi, I can't find any function in php to give me the first root of a number.Is there any built-in function for it? For example: 81 => 39 => 364 => 2256 => 2I wrote this
need help in creating captcha
hi i have a problem creating captcha system. i create some basic script for image displaying but it says this errorCode: The image “http://localhost/examples/captcha.php†cannot be
BI in Upstream Production operations
Appreciate if you can assist in the following areas:
PHP form authentication
Hi guys,what am trying to achieve is this: Whenever a user tries to login to my website, an error should be displayed for the first time notifying them to try again. Every time they open the website,
Logging and nologging bulk insert
Hi,
From Header Showing 'Unkown' In Hotmail? Why?
Code: $to = $row_GetID['email_addr'].',sales@mywebaddress.co.uk'; $subject = 'Thank you for your www.mywebaddress Order'.' ('.$row_GetID['ordernum_ID'].')';$headers = 'From:web@mywebaddress.co.uk';if
Post, not working, please help
The error is:Method Not AllowedThe requested method POST is not allowed for the URL /students/06/php/index.--------------------------------------------------------------------------------Apache/1.3.33
undefined offset help
Hi All,I kept getting undefined offset PHP notice for a simple for loop. For eg$va = array();$i=0;while($row = mysql_fetch_array($result)){ $va[$i] = $row['id']; $i++;}It gives undefined offset at