Add max execution time
This commit is contained in:
parent
ff47b388b1
commit
80be8e6120
@ -684,7 +684,9 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
*/
|
||||
public function fichierAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
ini_set('max_execution_time', 120);
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
@ -727,13 +729,13 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
foreach($tabFichier as $fichier){
|
||||
$tabTmp = explode('_', $fichier->UrlFichier);
|
||||
$date = new Zend_Date(substr($tabTmp[2],0,8),'yyyyMMdd');
|
||||
$localfile = $path.'/'.$fichier->UrlFichier;
|
||||
$localfile = $path.'/'.basename($fichier->UrlFichier);
|
||||
$dejaLu = false;
|
||||
if (!file_exists($localfile)) {
|
||||
$dejaLu = true;
|
||||
}
|
||||
$result = array(
|
||||
'fichier' => $fichier->UrlFichier,
|
||||
'fichier' => basename($fichier->UrlFichier),
|
||||
'date' => $date->toString('dd/MM/yyyy'),
|
||||
'dejaLu' => $dejaLu,
|
||||
);
|
||||
@ -801,8 +803,8 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( copy($response->getStreamName(), $file.'.bz2') ) {
|
||||
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
|
||||
$fp=fopen($file, 'w');
|
||||
$bz = bzopen($file.'.bz2', "r");
|
||||
$fp = fopen($file, 'w');
|
||||
while (!feof($bz)) {
|
||||
fwrite($fp, bzread($bz, 4096));
|
||||
}
|
||||
@ -902,8 +904,8 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( copy($response->getStreamName(), $file.'.bz2') ) {
|
||||
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
|
||||
$fp=fopen($file, 'w');
|
||||
$bz = bzopen($file.'.bz2', "r");
|
||||
$fp = fopen($file, 'w');
|
||||
while (!feof($bz)) {
|
||||
fwrite($fp, bzread($bz, 4096));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user