Sortir d'un script shell via PHP
Bonjour,
Voila mon problème, je nes sais pas bien ou doit être posté le sujet...
J'ai un script Shell unix qui fait appel à un script en php.
Le but c'est que si dans le script en php $a==test, je sort tu script unix sans afficher echo "bonjour" , est-ce possible ?
testdate.sh
<<<
Code:
1 2 3
| /usr/local/php5/bin/php testdate.php
echo $?
echo "bonjour" |
>>>
testdate.php
<?
Code:
1 2 3 4 5 6 7 8 9 10
| $a = "test";
if ($a == "test")
{
echo "good je sort du script";
exit;
}
else
{
echo "pas bon";
} |
?>
Merci beaucoup
José