cvs: pear /Net_URL URL.php

From: Date: Thu, 16 May 2002 09:58:37 +0000
Subject: cvs: pear /Net_URL URL.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3854@lists.php.net to get a copy of this message
richard Thu May 16 05:58:37 2002 EDT Modified files: /pear/Net_URL URL.php Log: * When no path, corrected to default to no path Index: pear/Net_URL/URL.php diff -u pear/Net_URL/URL.php:1.8 pear/Net_URL/URL.php:1.9 --- pear/Net_URL/URL.php:1.8 Sat May 11 16:28:03 2002 +++ pear/Net_URL/URL.php Thu May 16 05:58:37 2002 @@ -15,7 +15,7 @@ // | Author: Richard Heyes <richard@phpguru.org> | // +----------------------------------------------------------------------+ // -// $Id: URL.php,v 1.8 2002/05/11 20:28:03 richard Exp $ +// $Id: URL.php,v 1.9 2002/05/16 09:58:37 richard Exp $ // // Net_URL Class // @@ -135,7 +135,9 @@ $path = dirname($this->path) == '/' ? '' : dirname($this->path); $this->path = sprintf('%s/%s', $path, $urlinfo['path']); } - } + } else { + $this->path = ''; + } // Querystring $this->querystring = !empty($urlinfo['query']) ? $this->_parseRawQueryString($urlinfo['query']) : array(); @@ -243,4 +245,7 @@ return $qs; } } + +$u = new Net_URL('../www.example.com'); +echo $u->getUrl(); ?>

« previous php.pear.cvs (#3854) next »