hi,
i have a problem, in a pc whit xampp my page whit exec code, work well, but in other pc not....
whare are the possibile difference?
the version of server are the same, the sistem are home edition sp2+pacth in all pc....
thank's
Wiedmann wrote:but in other pc not....
Why not?
- error message?
- error.log?
- piece of (real) example code which is not working?
<head>
<meta http-equiv="Refresh" content="0; url=cronometri.php">
</head>
<?
$cartella="c:/xampp/htdocs/";//percorso iniziale
$cartella2="test/";//cartella temporanea
$sottocartella="pc".strtolower($chi)."/";//sottocartella per ogni pc
$file="putty";//nome file
$win=".bat";//estensione x windows
$pulisci=$cartella.$cartella2.$sottocartella.$file.$win;//percorso completo
exec($pulisci);//esegui file
?>
- Code: Select all
<meta http-equiv="Refresh" content="0; url=cronometri.php">
<!-- <meta http-equiv="Refresh" content="0; url=cronometri.php"> -->
- Code: Select all
<?
<?php
error_reporting(E_ALL);
- Code: Select all
exec($pulisci);//esegui file
exec($pulisci, $output, $return_var);//esegui file
echo '<pre>'.PHP_EOL;
var_dump($output);
var_dump($return_var);
echo '</pre>'.PHP_EOL;
array(2) {
[0]=>
string(0) ""
[1]=>
string(47) "C:\xampp\htdocs\test>start putty.exe -load NSS1"
}
int(0)
i have made modify, but the page are waiting for localhost.................
and i see the putty windows that request psw..... i close this windows
Wiedmann wrote:i have made modify, but the page are waiting for localhost.................
a) this also happens, if you disable/delete the line with "exec(...)"?
BTW:and i see the putty windows that request psw..... i close this windows
If you must close the putty window by your own, this code can only work if server and client is the same pc... And of course: If you start Apache as service, you can't see such a window in a normal installation.
Users browsing this forum: No registered users and 85 guests