2013-05-14 26 views
0

我的目錄看起來像這樣如何包括.phar和引用它

enter image description here

然後,我的代碼如下所示:

require "aws.*"; 

use Aws\DynamoDb\DynamoDbClient; 

這是做正確的方式?

它不會告訴我一個錯誤或任何東西,所以我不知道它是否正常工作。

回答

1

可以

include 'aws.phar'; 

include 'phar://aws.phar/internal/file.php'; 

或閱讀文檔約using phar

附:你不能在require或include中使用通配符。

P.P.S. use不是參考。 Read more about use