Soyez le premier à donner votre avis sur cette source.
Snippet vu 12 109 fois - Téléchargée 36 fois
<strong>realpath (__FILE__);</strong><br /> <?php $real_path = realpath (__FILE__); echo $real_path; ?> <br /><br /><strong>basename (__FILE__,".php");</strong><br /> <?php $file = basename (__FILE__,".php"); // $file is set to "index" echo $file; ?> <br /><br /><strong> $file = dirname (__FILE__); </strong><br /> <?php $file = dirname (__FILE__); echo $file; // $file vaut "/etc" ?> <br /><br /> <strong>$real_path = realpath ("index.php");</strong><br /> <?php $real_path = realpath ("index.php"); echo $real_path; ?> <br /><br /><strong>echo dirname(__FILE__)</strong><br /> <?php echo dirname(__FILE__) ; ?> <br /><br /> <strong>$_SERVER['DOCUMENT_ROOT']</strong><br /> <?php echo $_SERVER['DOCUMENT_ROOT']; ?> <br /><br /><br /> <h2>Les variables serveur</h2><br /><br /> <?php echo '<strong>Chemin du script courant=>$_SERVER[\'PHP_SELF\']</strong>'; echo '<br />'; echo $_SERVER['PHP_SELF'].''; echo '<br /><br />'; echo '<strong>Nom du serveur=> $_SERVER[\'SERVER_NAME\']</strong>'; echo '<br />'; echo $_SERVER['SERVER_NAME'].''; echo '<br /><br />'; echo '<strong>Variables passées au script=> $_SERVER[\'QUERY_STRING\']</strong>'; echo '<br />'; echo $_SERVER['QUERY_STRING'].''; echo '<br /><br />'; echo '<strong>Document root=> $_SERVER[`\'QUERY_STRING\']</strong>'; echo '<br />'; echo $_SERVER['DOCUMENT_ROOT'].''; echo '<br /><br />'; echo '<strong>Référant=>$_SERVER[\'HTTP_REFERER\']</strong>'; echo '<br />'; echo @$_SERVER['HTTP_REFERER'].''; echo '<br /><br />'; echo '<strong>Adresse ip de l\'utilisateur=>$_SERVER[\'REMOTE_ADDR\']</strong>'; echo '<br />'; echo $_SERVER['REMOTE_ADDR'].''; ?> <br /><br />dirname($_SERVER['PHP_SELF']).'/';<br /> <?php echo dirname($_SERVER['PHP_SELF']).'/'; ?>
15 oct. 2007 à 11:54
1 avril 2007 à 14:01
1 avril 2007 à 13:30
24 oct. 2006 à 10:00
@+
24 oct. 2006 à 09:41
comme ça tu dev en local et le jour où tu envoies ça en ligne ça marche direct ;)
@++
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.