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?
i have no idea why this isn't working
Code: <?phpsession_start();include("connect.php");error_reporting(E_ALL);ini_set('display_errors', '1'); $username = "Master";$password = "pword";$host =
Embed Video Problem
Hey, thanks for looking!File to be embedded:Code: <playlist version="1"><trackList><track><title>SOCCER -
Check something, wait, check again, do something!
Hi guys. I wonder if someone can help me with this.Basically, what I want to do is (for arguments sake I will use google.com as an example) check to see if google.com is alive. If its alive, I want it
PHP Tab Control
Hi All,I would like to have PHP tab control with/without Javascript. But I want to retrieve some information from database server when clicking on a tab. Any body had used this kind of tab?Any help
update 2 columns by doing inner 2-column query
Hi,
getting Vars to pass to next page.
Hello all, I have a confusing situation on my hands, i am a member of a gaming community and we are setting up a website (yay i get to be teh techie!!) im not exactly a noob with php but i am by far
Filtering an Array Based on Value
I have a very simple script set up that pulls data from a database and is output using this code:Code: Print "<table border cellpadding=3>";Print
Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious... i.e. different devices has a similar configuration, but how I can discern it by device? Code: <config><device
Passing PHP variables from one page to another
Hello-I'm having trouble figuring out how to transport a variable from one php file to another. Specifically, the name of an image, to be used as a subject in a form mail. I don't even really have the
Registration
ok so i have a site where people can register and login which works now thanks to someone on here that pointed out my error :-)Now my users click my links they can view the content without logging in,