I was wondering, if there's a way to extend Exception in such a way, that it would contain name of a method where it has been thrown.
Right now I have this:
class myException extends Exception {
protected $method;
public function __construct($message, $method, $code = 0, Exception $previous = null) {
$this->method = $method;
parent::__construct($message, $code, $previous);
}
public function getMethod() {
return $this->method;
}
}
but passing __METHOD__ as a parameter whenever exception is thrown doesn't look really good...
[edit]
Oh wait a second... I can get it from trace, can't I?
My query is being run with no results.
I have this.Code: function DropUser($duser_id, $user_email, $user_username) { if(isset($_SESSION['admin_username']) && isset($_SESSION['admin_id']) &&
What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a certain amount of time (1 use, 1 day, 1 week, etc).Can someone explain to me what exactly it's
Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand, so, if I may, I'd like to ask quite a specific question.I'm creating a contact form, and I need to
Logic question
im wondering what's the best method to do the above list:it is for alliance @ MMORPG game -the administrator of alliance have 10 slots for creating ranks ... each rank have it's own permissions (in
want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea on how to do this???this is the code i'm workig with<?php$connect =
How to get the previous months last date....
Here's my wittle problem. I suck at working with dates.So today is 10/20/2009, i need to figure out how to useCode: $lastmonth = date("m-d-Y", strtotime(" "));in order to get
Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the going through something like paypal. I've never done that before...what is my first step? I really dont
Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.So this would write 2232 as the cookie for ID.http://www.example.com/redirect.php?ID=2232Ultimately, I'm working on a pixel tracking
filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I have a method, that is supposed to open a file and write to the file, but I am having issues. Each
dropdown menu
Hello everbody, I am php newbie. I need to develop a program that once click the drop down menu, the textarea will change the value base on the dropdown menu. I have problem changing the value of