Révision 5119cb9e
Ajouté par Jocelyn Delande il y a environ 11 ans
genererPano.php | ||
---|---|---|
25 | 25 |
} else { |
26 | 26 |
mkdir($pano_dest); |
27 | 27 |
$escaped_command = escapeshellcmd('./to_tiles/gen_tiles.sh -p '.$pano_dest.'/'.$pano_basename.' ./upload/'.$pano_name); |
28 |
|
|
28 |
|
|
29 | 29 |
printf("<h2>Exécution de la commande :</h2>\n<p class=\"cmd\"><samp>%s</samp></p>\n<pre>", htmlspecialchars($escaped_command)); |
30 | 30 |
if ($fp = popen($escaped_command, 'r')) { |
31 | 31 |
while (!feof($fp)) { |
32 |
//set_time_limit (20);
|
|
33 |
$results = fgets($fp, 4096);
|
|
34 |
if (strlen($results) == 0) {
|
|
35 |
// stop the browser timing out
|
|
36 |
flush();
|
|
37 |
} else {
|
|
38 |
$tok = strtok($results, "\n");
|
|
39 |
while ($tok !== false) {
|
|
40 |
echo htmlspecialchars(sprintf("%s\n",$tok))."<br/>";
|
|
41 |
flush();
|
|
42 |
$tok = strtok("\n");
|
|
43 |
}
|
|
44 |
}
|
|
32 |
//set_time_limit (20);
|
|
33 |
$results = fgets($fp, 4096);
|
|
34 |
if (strlen($results) == 0) {
|
|
35 |
// stop the browser timing out
|
|
36 |
flush();
|
|
37 |
} else {
|
|
38 |
$tok = strtok($results, "\n");
|
|
39 |
while ($tok !== false) {
|
|
40 |
echo htmlspecialchars(sprintf("%s\n",$tok))."<br/>";
|
|
41 |
flush();
|
|
42 |
$tok = strtok("\n");
|
|
43 |
}
|
|
44 |
}
|
|
45 | 45 |
} |
46 | 46 |
print("</pre>\n"); |
47 | 47 |
if (pclose($fp) === 0) { |
48 |
print("<h4><span class=\"success\">Opération réussie</span></h4>\n");
|
|
49 |
printf("<p>Pour acceder directement au panorama <a href=\"panorama.php?dir=%s&panorama=%s\">cliquer ici</a></p>\n",
|
|
50 |
PANORAMA_PATH, $pano_basename);
|
|
48 |
print("<h4><span class=\"success\">Opération réussie</span></h4>\n");
|
|
49 |
printf("<p>Pour acceder directement au panorama <a href=\"panorama.php?dir=%s&panorama=%s\">cliquer ici</a></p>\n",
|
|
50 |
PANORAMA_PATH, $pano_basename);
|
|
51 | 51 |
} else { |
52 |
print("<h4><span class=\"error\">Opération en échec durant l'exécution du script !</span></h4>\n");
|
|
52 |
print("<h4><span class=\"error\">Opération en échec durant l'exécution du script !</span></h4>\n");
|
|
53 | 53 |
} |
54 | 54 |
} else { |
55 | 55 |
print("<h4><span class=\"error\">Opération en échec à l'ouverture du script !</span></h4>\n"); |
Formats disponibles : Unified diff
unified the tab/spaces mix to spaces