2013-05-14 30 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