script qui verifie si la config a ete modifiée [download]

Consultez la formation à Google Analytics de WebRankInfo / Ranking Metrics


rog
WRInaute accro
WRInaute accro
 
Messages: 1662
Inscription: Jeu Sep 21, 2006 2:32

script qui verifie si la config a ete modifiée [download]

Message le Ven Jan 19, 2007 18:30

j'ai du pondre quelques lignes pour verifier si mes modifs de config php declarées dans mes vhosts etaient bien prises en compte

ça peut toujours servir à quelqu'un

Code: Tout sélectionner
<?php
########################################################################################
# 19/01/2007
#
#   check modified php config var by roger girardin
#
#   it check if any php config var in php.ini was modified, the modified vars will be displayed
#    on a red background
#
########################################################################################
#
$test = array();
#
$ini = ini_get_all();
$display = "<html>
<head>
<style type=\"text/css\">
.title {background: blue; font-family: Arial; font-size: 13px; color: white; width: 100%}
.red {background: red; font-family: Arial; font-size: 13px; color: white; width: 100%}
.content{background: #FFFFFF; font-family: MS Sans Serif; font-size: 12px; color: black;}
.nat {background: white; width: 100%}
BODY{margin-top:0;margin-left:0}
</style>
</head>
<body>
<table>";
#
$i = 0;
while(list($key,$val) = each($ini))
   {
   $i++;
   #
   $j = 0;
   $display_value = null;
   #
   while(list($key2,$val2) = each($val))
      {
      # result fills an array
      $test[$i][$j] = $val2;
      #
      $display_value .= "
         <td>$key2</td>
         <td>$val2</td>
         ";
      $j++;
      }
      #
      trim($test[$i][$j-3]) != trim($test[$i][$j-2]) ? $class = 'red': $class = 'title';
      
      $display .= "
      <tr class=\"$class\">
         <td colspan=\"6\">$i $key
         </td>
      </tr>
      <tr class=\"content\">
         $display_value
      </tr>";
   }
$display .= "</table></body></html>";

print($display);
?>


rog

Formation recommandée sur ce thème :

Formation Google Analytics : en 2 jours, apprenez comment exploiter l'essentiel des possibilités de l'outil de mesure d'audience de Google. Formation animée par Julien Coquet, expert certifié officiellement par Google Analytics.

Tous les détails sur le site Ranking Metrics : programme, prix, dates et lieux, inscription en ligne.

Lectures recommandées sur ce thème :



Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 0 invités