php include("/var/www/pimcore/cli/startup.php"); ini_set('memory_limit', '1G'); ini_set('max_execution_time', '0'); //connexion PDO $db = Pimcore_Resource::get(); $db->query('SET NAMES utf8'); //Connexion à la base de données en php simple $bdd = "pimcore"; /*$host = "localhost"; $user = "root"; $password = "p1mc0r3"; $connection = mysql_connect($host, $user, $password) or die("Connexion impossible"); mysql_select_db($bdd); mysql_query('SET NAMES utf8');*/ $link = mysqli_connect("localhost", "root", "p1mc0r3", "pimcore");//PROD //$link = mysqli_connect("localhost", "root", "gtptak6", "pimcore");//PREPROD //DATE $datedebut = date('YmdHi'); $dateAnneeJourHeureMin = date('d-m-Y/H:i'); //////`----------------FONCTIONS---------------/////////////// function WriteLog($errtxt) { global $datedebut ; $fp = fopen('/var/www/dev/LOG/logexportRAB'.$datedebut.'.txt' ,'a+'); fseek($fp,SEEK_END); $nouverr=$errtxt." (".date("Y-m-d H:i:s").") \r\n"; fputs($fp,$nouverr); fclose($fp); } function WriteLogERROR($errtxt) { global $datedebut ; $fp = fopen('/var/www/dev/LOG/logErrorExp.txt' ,'a+'); fseek($fp,SEEK_END); $nouverr=$errtxt." (".date("Y-m-d H:i:s").") \r\n"; fputs($fp,$nouverr); fclose($fp); } function WriteLogSUPP($errtxt) { global $datedebut ; $fp = fopen('/var/www/dev/LOG/logFicheSup.txt' ,'a+'); fseek($fp,SEEK_END); $nouverr=$errtxt." (".date("Y-m-d H:i:s").") \r\n"; fputs($fp,$nouverr); fclose($fp); } |
include("/var/www/pimcore/cli/startup.php"); ini_set('memory_limit', '1G'); ini_set('max_execution_time', '0'); //connexion PDO $db = Pimcore_Resource::get(); $db->query('SET NAMES utf8'); //Connexion à la base de données en php simple $bdd = "pimcore"; /*$host = "localhost"; $user = "root"; $password = "p1mc0r3"; $connection = mysql_connect($host, $user, $password) or die("Connexion impossible"); mysql_select_db($bdd); mysql_query('SET NAMES utf8');*/ $link = mysqli_connect("localhost", "root", "p1mc0r3", "pimcore");//PROD //$link = mysqli_connect("localhost", "root", "gtptak6", "pimcore");//PREPROD //DATE $datedebut = date('YmdHi'); $dateAnneeJourHeureMin = date('d-m-Y/H:i'); //////`----------------FONCTIONS---------------/////////////// function WriteLog($errtxt) { global $datedebut ; $fp = fopen('/var/www/dev/LOG/logexportRAB'.$datedebut.'.txt' ,'a+'); fseek($fp,SEEK_END); $nouverr=$errtxt." (".date("Y-m-d H:i:s").") \r\n"; fputs($fp,$nouverr); fclose($fp); } function WriteLogERROR($errtxt) { global $datedebut ; $fp = fopen('/var/www/dev/LOG/logErrorExp.txt' ,'a+'); fseek($fp,SEEK_END); $nouverr=$errtxt." (".date("Y-m-d H:i:s").") \r\n"; fputs($fp,$nouverr); fclose($fp); } function WriteLogSUPP($errtxt) { global $datedebut ; $fp = fopen('/var/www/dev/LOG/logFicheSup.txt' ,'a+'); fseek($fp,SEEK_END); $nouverr=$errtxt." (".date("Y-m-d H:i:s").") \r\n"; fputs($fp,$nouverr); fclose($fp); }