简体   繁体   中英

How to include a .phar and reference it

My directory looks like this

在此处输入图片说明

Then my code looks like this:

require "aws.*";

use Aws\DynamoDb\DynamoDbClient;

Is this the right way to do it?

It doesn't show me an error or anything so I don't know if it's working or not.

You can

include 'aws.phar';

or

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

or read documentation about using phar

PS you cannot use wildcards in require or include.

PPS use is not a reference. Read more about use .

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