2014-01-25 24 views

回答

4

您可以使用PHP的exec函數。或者,如果您想要對其進行更多控制並以良好的方式讀取結果,則可以使用Symfony Process component

exec('bower'); 
// or it's shortcut 
`bower`; 

// or the Process component 
use Symfony\Component\Process\Process; 

$bower = new Process('bower'); 
$bower->run(); 

// ... other nice things, like $bower->isSuccesful(), ->getOutput() & more