Re: How can I tell if a path is absolute?

From: Date: Sat, 17 Jul 2004 09:15:56 +0000
Subject: Re: How can I tell if a path is absolute?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-190832@lists.php.net to get a copy of this message
Michael Ochs wrote: > Hi, > maybe you could try it with regular expressions! "[A-Z]:\\" or better > "[C-Z]:\\" because A and B is used just for floppy drives... > Take a look at www.php.net/preg_match/ I'm not sure if you noticed, but I said I wanted it to be portable. Sure, "([A-Za-z]:)?[/\\]" would work to some extent, but would it work perfectly? As far as I can tell, the path "C:/" is _relative_ on Linux and BSD. Am I wrong? TX -- 'Every sufficiently advanced technology is indistinguishable from magic' - Arthur C Clarke 'Every sufficiently advanced magic is indistinguishable from technology' - Tom Graves Email: Trejkaz Xaoza <trejkaz@xaoza.net> Web site: http://xaoza.net/trejkaz/ Jabber ID: trejkaz@jabber.xaoza.net GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F A62C B8C7 BC8B 037E EA73

« previous php.general (#190832) next »