All pastes #609236 Raw Edit

Someone

public php v1 · immutable
·published 2007-07-08 19:28 UTC
rendered paste body
<?phpclass xpath{	public $id;	public $user;	public $action;	public function parse()	{		$pagem = $_SERVER['PATH_INFO'];		if (preg_match('/(\w+)\:(\w+)[\/]*$/i', $pagem, $matches2))		{			$page = $matches2[1];			$this->id = $matches2[2];			$this->user = $matches2[2];		}		elseif (preg_match('/(\w+)[\/]{0,1}$/', $pagem, $matches2))		{			$page = $matches2[1];		}		$this->action = ($page) ? $page : false;		return $this->action;	}}