Notice: Undefined variable: elink in /var/www/tuxnet24.de/codebase-1.03/include/function-main.inc.php on line 1956

Notice: Undefined variable: dlink in /var/www/tuxnet24.de/codebase-1.03/include/function-main.inc.php on line 1956

Notice: Undefined variable: elink in /var/www/tuxnet24.de/codebase-1.03/include/function-main.inc.php on line 1956

Notice: Undefined variable: dlink in /var/www/tuxnet24.de/codebase-1.03/include/function-main.inc.php on line 1956
PHP - env.php
38.107.191.113 |    

Navigation

Google Advertisement

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

env.php
  1. #!/usr/bin/php
  2. <?php
  3.  
  4. foreach ( $_SERVER as $keys => $value ) echo $keys." = ".$value."n";
  5.  
  6. ?>
Parsed in 0.103 seconds at 960 B/s

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
urlencode
(Perl::Function)
gethostbyaddr
(Perl::Function)
create_function
(JavaScript::Snippets)
function_exists
(JavaScript::Snippets)
listing
(PHP::Function)
runPhpCode
(PHP::Function)
md5
(Bash::Function)
rtrim
(Bash::Function)
ltrim
(Bash::Function)
function_exists
(Bash::Function)