这是我在 sublime explorer 中的文件:
我可以包含 config.php 但不能包含其他:
echo get_include_path(); //output: .:/usr/local/pear/share/pear
set_include_path(SITE_SERVER.'vendor/google-api-php-client/src');
echo get_include_path(); //output: /Users/harrywiles/Dropbox/Sites/headfirst/vendor/google-api-php-client/src
require_once 'config.php'; //works
require_once 'Google_Client.php'; //doesnt work
即使我知道路径是正确的,我也会得到经典错误:
Fatal error: require_once(): Failed opening required 'Google_Client.php' (include_path='/Users/harrywiles/Dropbox/Sites/headfirst/vendor/google-api-php-client/src')
这让我精神振奋,所以任何帮助都非常感激!