Пример #1
0
function parcourirDossierIdentification($pPath)
{
    if (is_dir($pPath)) {
        $d = dir($pPath);
        while (false !== ($entry = $d->read())) {
            if ($entry != '.' && $entry != '..' && $entry != '.svn' && $entry != '.project' && $entry != '.htaccess') {
                if (is_dir($d->path . '/' . $entry)) {
                    parcourirDossierIdentification($d->path . '/' . $entry);
                } else {
                    $filename = $d->path . '/' . $entry;
                    echo file_get_contents($filename);
                }
            }
        }
        $d->close();
    } else {
        echo file_get_contents($pPath);
    }
}
Пример #2
0
 function parcourirDossierIdentification($pPath, $lVersionTechnique)
 {
     if (is_dir($pPath)) {
         $d = dir($pPath);
         while (false !== ($entry = $d->read())) {
             if ($entry != '.' && $entry != '..' && $entry != '.svn' && $entry != '.project' && $entry != '.htaccess') {
                 if (is_dir($d->path . '/' . $entry)) {
                     parcourirDossierIdentification($d->path . '/' . $entry, $lVersionTechnique);
                 } else {
                     $filename = $d->path . '/' . $entry;
                     $lLigne = file_get_contents($filename);
                     if ($entry == "AccueilVue.js") {
                         $lLigne = preg_replace("/.\\/js\\/zeybux-configuration.php/", "./js/zeybux-configuration-min-" . $lVersionTechnique . ".js", $lLigne);
                     }
                     if ($entry == 'IdentificationVue.js') {
                         $lLigne = preg_replace('/".php"/', '"-min-' . $lVersionTechnique . '.js"', $lLigne);
                     }
                     $fp = fopen("./zeybu/js/zeybux-core.js", 'a');
                     fwrite($fp, $lLigne);
                     fclose($fp);
                 }
             }
         }
         $d->close();
     }
 }