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?
onClick='location.href=index.htm'> not working
Below is my code:echo "<input type='button' value='redirect' onClick='location.href=index.htm'>";what is wrong with the code?? it's not working
how to export excel file in same server
My first post - php newbie, so appreciate your support.I'm currently using headers to save web page as excel file.$filename="sms.xls";header("Pragma: public");header("Expires:
problem in program for counting no of chars using pointers
Hi all, I was trying to make a program which counts number of chars in a string using concpt of pointers. Following is the code:
Taking an HTML form and a PHP program and making it into one working file.
Hello, So I would like to display everything INSIDE a specific directory. In other words, I would like to display all file name's inside all subfolders in a specific directory. (NOT the subfolder
split string
Hi all i have some names (imploded by comma):Code: toronto,paris,madridNow, i would obtain this result:Code: 'toronto','paris','madrid'How can i do? thanks
Remove directories not empty
hi,i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.I must to delete only the folders in array, i use this code:Code: $all_folders = array();while ($row =
Help with setcookie()
Merry Xmas to those on this foruumOlder guy here with some experience but not allot so please be gentle.I am having problems with setting cookies on my web site. At one time they worked and for the
change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I have this htmlview plaincopy to clipboardprint?<ol> <li> <asp:TextBox
admin with my register system?
Hey i wana make it so i can make a admin level on my register system , I'm kinda new to php to im not sure how, i wana do something like a 'if' statment so when they click the page if the admin level
PHP/PKI
I am trying to set up a web application that uses pki. does anyone have a good tutorial to set this up? I have a "dedicated server" to do all this on