File "pat.php"
Full Path: /home/analogde/www/Bookmarks/CHESS_ON/pat.php
File size: 908 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
date_default_timezone_set('Europe/Paris');
$jour = date('d:m:Y');
$heure = date("H:i:s");
//$infos = $jour.'-'.$heure;
$fichier = "sauvegarde_insertion_" .$jour.'-'.$heure .".txt";
echo $fichier;
/*$chemin = 'homez.65/analogde/www/CHESS_2022/images';
if(!is_dir($chemin))
{
echo " ya bon";
}*/
$directoryName = 'LOGS';
//Check if the directory already exists.
if(!is_dir($directoryName))
{
//Directory does not exist, so lets create it.
mkdir($directoryName, 0755);
}
else
{
echo "Le répertoire LOGS existe dèjà !";
}
echo "<br><br>";
// dossier courant
echo getcwd() . "\n";
echo "<br><br>";
chdir($directoryName);
// dossier courant
echo getcwd() . "\n";
echo "<br><br>";
$file = fopen($fichier, "a");
fwrite($file,"Mon texte");
fclose($file);
echo "FIN...";
?>