Bonjour j'ai un petit problème lorsque je lance mon programme depuis la page html j'ai aucun retour j'ai juste un chargement infini.
Le problème viens surement de mon .bat et je sais pas quoi faire.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 <?php include 'les_ballades1.php'; class Objet_scan{ public $fichier = array (); public function ScanDirectory($dir_nom){ $dossier= array(); $lien = null; $dir_nom = str_replace ('\\' , '/' , $dir_nom); $dir = opendir($dir_nom) or die('Erreur de listage : le répertoire n\'existe pas'); while($element = readdir($dir)) { if($element != '.' && $element != '..'){ if (!is_dir($dir_nom.'/'.$element)){ if(substr($element,-4,4)==".pdf"){ $this->fichier[] = "$dir_nom\\$lien\\$element"; } }else {$dossier[] = $element;} } } closedir($dir); if(!empty($dossier)){ foreach($dossier as $lien){ $this->ScanDirectory("$dir_nom\\$lien"); } } } public function fait_feuilleteur () { //Recherche de tout les fichiers loisirs if(!empty($this->fichier)){ $pdf = new FPDI(); //Enregistrement des pages dans dans le pdf qui a été initialisé au debut. foreach($this->fichier as $s) { echo "$s\n"; if(substr_count($s,'LOISIRS-4') != 0 || substr_count($s,'LOISIRS_GARD-4') != 0){ echo "Creation du init\n"; $pdf->setSourceFile("$s"); $import = $pdf->importPage(1); $taille = $pdf->getTemplatesize($import); $pdf->addPage('P', array($taille['w'], $taille['h'])); $pdf->useTemplate($import); $pdf->SetDisplayMode('fullpage'); } } $pdf->Output("Loisirs\\"."Les_ballades_du_languedoc.pdf", 'F'); $pdf->close(); unset ($pdf); } } }
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 <?php require_once('fpdf.php'); require_once('fpdi.php'); //Creation du dossier de stokage @mkdir("Loisirs", 0700); if(isset($_POST['dateD'])){ if($_POST['dateD']!=""){ echo "Entrez votre chemin : "; $dir_nom=$_POST['dateD']; echo "Votre chemin est $dir_nom \n"; } } // echo "Entrez votre chemin : "; // $dir_nom=trim (fgets(STDIN)); // echo "Votre chemin est $dir_nom"; $a = new Objet_scan; $a->ScanDirectory($dir_nom); $a->fait_feuilleteur();
Code:
1
2
3
4
5
6
7
8
9
10
11
12 <?php if($_POST['choix']=='ballade') { exec('start exec_ballade.bat'); echo "\n\nBallades !!!!!!!!!!!\n\n"; } else { exec('start exec_resto.bat'); echo "\n\nRestos !!!!!!!!!!!\n\n"; }
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title><Recherche de loisirs</title> </head> <body style="background-color: red; color: rgb(0, 0, 0);" alink="#ee0000" link="#0000ee" vlink="#551a8b"> <div style="text-align: center;"> <p style="text-decoration: underline;font-weight: bold;">Recuperation de page loisirs</p> <p style="text-align: left;text-decoration: underline;font-weight: bold;">Une sortie en resto ou une petit balade faites votre choix</p> </div> <form method="post" action="les_loisirs.php" name="formulaire"> <p> <link rel="stylesheet"href="datepicker/jquery-ui/css/ui-darkness/jquery-ui-1.8.21.custom.css"> <script src="datepicker/jquery-ui/js/jquery-1.7.2.min.js"></script> <script src="datepicker/jquery-ui/js/jquery-ui-1.8.21.custom.min.js"></script> <script> $(document).ready(function(){ $('#dateD').datepicker({dateFormat: 'yy\\mm\\dd'}); }); $(document).ready(function(){ $('#dateF').datepicker({dateFormat: 'yy\\mm\\dd'}); }); </script> <label for="date"> Date de debut de recherche </label> <input type="text" name="dateD" id="dateD"> <label for="date"> Date de fin recherche</label> <input type="text" name="dateF" id="dateF"> Faites votre choix :<br><br> <input type="radio" name="choix" value="ballade" id="ballade" /> <label for="riche">Les ballades</label><br><br> <input type="radio" name="choix" value="resto" id="resto" /> <label for="celebre">Les restos</label><br><br> </p> <p><input value="VALIDER" type="submit"></p> </form> </body> </html>
Code:
1
2@echo off php les_ballades.php