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
| <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// Connexion
$commandes = "";
$reponse = $bdd->query('SELECT slug_client FROM clients');
while ($donnees = $reponse->fetch())
{
$commandes .= "php ".$donnees["slug_client"].".php;";
}
$reponse->closeCursor();
//echo substr($commandes, 0, -1);
exec(substr($commandes, 0, -1));
//command1 ; command2 (run both uncondtionally)
//command1 && command2 (run command2 only if command1 succeeds)
?> |