3.230.162.238 |    

Navigation

Google Advertisement

Diese Skript macht das gleiche wie in der Bash der Befehl env und zeigt die Umgebungsvariablen an.

Name env.php
Category PHP
Date 2009-01-03 02:37:24
Author Marko Schulz
Hits 7858
Rating  
Tags environment

Diesen Befehl kann man in der Commend Line wie folgt ausführen, ohne es erst in einem Skript zu speichern:
tux@earth:~$ php -r 'foreach ( $_SERVER as $keys => $value ) echo $keys." = ".$value."\n";'
Posted by Marko Schulz at 2009-01-03 02:38:22
 

Will man das Skript als CGI Skript und die Ausgabe in HTML haben, kann man folgendes verwenden:
<?php

// file: env.php
foreach ( $_SERVER as $keys => $value ) echo "<b>".$keys."</b> = <i>".$value."</i><br/>\n";

?>
Posted by Marko Schulz at 2009-01-03 02:39:03
 

Search
 
Full text search by name and content of a snippet.

User online
There are 5 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)