33 lines
1.6 KiB
PHP
Executable File
33 lines
1.6 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Génération du fichier
|
|
// -----------------------------------------------------
|
|
$retour='';
|
|
|
|
// -----------------------------------------------------
|
|
// Generation du fichier
|
|
// -----------------------------------------------------
|
|
if (!isset($niveau)) $niveau=1;
|
|
if ($niveau==0) $profondeur = ".";
|
|
if ($niveau==1) $profondeur = "../.";
|
|
if ($niveau==2) $profondeur = "../../.";
|
|
if ($niveau==3) $profondeur = "../../../.";
|
|
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(1, ['niveau' => $niveau, 'profondeur' => $profondeur, 'theEmplacement' => $theEmplacement, 'theFicPage' => $theFicPage], '01-generationFichier.php');}
|
|
|
|
// -----------------------------------------------------
|
|
// Generation du contenu
|
|
// -----------------------------------------------------
|
|
include ("02-genererContenuPage.php");
|
|
|
|
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(1, ['fichier' => $theEmplacement.$theFicPage ], '01-generationFichier.php');}
|
|
// if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(1, ['thePHP' => $thePHP ], '01-generationFichier.php');}
|
|
|
|
if ($theEmplacement!='' && is_dir( $profondeur.$theEmplacement) ) {
|
|
$retour=file_put_contents($profondeur.$theEmplacement.$theFicPage, $thePHP);
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['code retour' => $retour], '');}
|
|
}
|
|
else {
|
|
$admMsg .="Attention emplacement invalide : " .$profondeur.$theEmplacement.$theFicPage;
|
|
}
|
|
?>
|