note 50373 deleted from function.substr by nlopess

From: Date: Sat, 26 Feb 2005 20:23:30 +0000
Subject: note 50373 deleted from function.substr by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-85609@lists.php.net to get a copy of this message
Note Submitter: Fser Reason: useless ---- what about this one ? <?php $addr = Substr($_SERVER["HTTP_HOST"],0, strpos($_SERVER["HTTP_HOST"],".")); if(is_dir($addr)) { echo '<a href="./'.$addr.'/">'.$addr.'</a>'; } else { echo "<pre>Le dossier \"$addr\" n'existe pas .</pre>"; } ?> We can use it to "create" domains : for example : name.domain.com will return name, so then, let's just taste variable and do.

« previous php.notes (#85609) next »