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?
MySQL query problem
When I try to run the following piece of code, I get this error:QuoteWarning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/muskelmann098/public_html/build.php on line
writing a screen scraper
Hello,I'm writing a screen scraper application and want to be able to get absolute addresses for images from relative links.So a link like this: Code: <img
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
Force download script not handling files with spaces properly
I have a regular old php force download script, uses this code:Code: header("Cache-Control: "); header("Pragma: "); header("Content-type: application/octet-stream");
Paypal
Hi all,I have an advanced basic knowledge of php I want to try something new for a site I am working on, its a members site with a monthly fee for being a member of the site. Basically what I want to
my code does not work.
I have a code problem.Quote"<a href=index.php?gogo=ureticidetay&'?l={$letter}'>{$ letter}</a>" this is not working. but need link like this
Php Mysql Page Loading Notice
Hi all,I was wondering if there is a way (Sure there is) of showing a message or an image while a page is loading.The issue is that I have a big table and I'm running some queries against it.Obviously
php title problem
Hi,I am having a problem managing my page title with PHP.Currently I have my <title> tags in each PHP document, followed by my header.php which has my functions.php file contained in it.
Help: calling function
Hi,Is it possible to call a php function on page close?If yes, could you explain how and where to call?any example code will be appreciated.Thanks
WELCOME SCREEN
first of all let me tell you what does my script do, it´s a very simple query to show a email from a database, (EX: Welcome: user@server.com). i get the email whit the id.