composer提示找不到库

composer class not found

composer成功后,跑对应的例子,提示 Class 'xxxx' not found
原因是没有启用autoload:

<?php
require __DIR__ . '/vendor/autoload.php';

optimize automatic loading

composer dump-autoload --optimize

ref:https://github.com/aliyun/openapi-sdk-php/blob/master/docs/en-US/1-Installation.md


发表评论

电子邮件地址不会被公开。 必填项已用*标注