PHP under linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Akkad
    New Member
    • Jun 2007
    • 18

    PHP under linux

    [code=php]
    <?php
    echo $_SERVER[HTTP_USER_AGENT];
    $t=split(" ",$_SERVER[HTTP_USER_AGENT]);
    echo "<pre>";
    print_r($t);
    echo "</pre>";

    $yy=$t[2]." ".$t[3];
    $jj=split(";",$ yy);
    echo "<pre>";
    print_r($jj);
    echo "</pre>";

    $uu=$jj[0];


    $a=$t[4]." ".$t[5];
    #echo $a;

    $b=split(";",$a );
    echo "<pre>";
    print_r($b);
    echo "</pre>";

    $c=split(" ",$_SERVER[SERVER_ADDR]);
    echo "<pre>";
    print_r($c);
    echo "</pre>";
    $d=date("Y-m-d H:i:s");
    echo $d;
    ?>
    [/code]

    i am writting this code under Linux but nothing is appearing while the same code is given the output on the local server.
    the php version on redhat linux 7.2 is PHP 4 so what should i do that the HTTP header variables will be shown.
    Last edited by ak1dnar; Jul 13 '07, 11:11 AM. Reason: Added [CODE] Tags
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Which version of PHP you are using on linux, 4.0.5, 4.2 or 4.4?

    Take a look at $_SERVER.

    Comment

    • ak1dnar
      Recognized Expert Top Contributor
      • Jan 2007
      • 1584

      #3
      Please Use code tags when posting source codes.
      Thanks!

      Comment

      Working...