简体   繁体   中英

xcodebuild not work in php but works fine in command line

As the title, I want to build the app with xcodebuild. Unexpected, the code bellow is not work in php but works fine in Command Line Tools:

echo '########' . exec('xcodebuild -list') . '########';

I check the permission of the files is 777, is the php not support the xcodebuild?

This is probably a problem with PHP not having access to the same environment variables, eg $PATH. Try like this:

echo '########' . exec('/usr/bin/xcodebuild -list') . '########';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM