[Système] executer une commande linux
Bonjour,
je bloque sur la commande system ou exec.
je m'explique : quand je tape
Code:
system("rrdtool graph test.png ....");
ou
Code:
exec("rrdtool graph test.png ....");
ca fonctionne correctement.
mais j'ai creer une classe qui me genere le code rrd que je rentre dans une variable. et quand je fait :
Code:
1 2 3 4 5 6 7
| $graph = new graph_rrd();
...
$code = $graph->graph();
// où $code = rrdtool graph test.png .....
system($code);
// ou system("$code"); exec($code); exec("$code"); |
ca ne fonctionne pas.
quelqu'un peut il m'aider ?