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/
Bye, Michael "Trejkaz Xaoza" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi! > > I used to detect whether a path is absolute by seeing if the first character > is a forward slash. > > Unfortunately, Windows absolute paths are in a different syntax like "C:\", > and I don't know what other random systems might have for their syntax in > the future. > > So, is there a portable way to tell if a path is absolute or not? I thought > about comparing the start of the path with realpath('/'), but this only > works if the path starts with "C:" and fails for "D:" and other drives. > > 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 <[EMAIL PROTECTED]> > Web site: http://xaoza.net/trejkaz/ > Jabber ID: [EMAIL PROTECTED] > GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F A62C B8C7 BC8B 037E EA73 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php