PhpStorm库看不到库

问题描述 投票:0回答:1
<?php
use MetzWeb\Instagram\Instagram as InstagramAlias;

$instagram = new InstagramAlias(array(
    'apiKey'      => 'YOUR_APP_KEY',
    'apiSecret'   => 'YOUR_APP_SECRET',
    'apiCallback' => 'YOUR_APP_CALLBACK'
));

echo "<a href='{$instagram->getLoginUrl()}'>Login with Instagram</a>";

[我在make时用作曲家添加了库

use MetzWeb\Instagram\Instagram 

它看到了,但是当我开始编写代码时,它说没有名为instagram的类

Fatal error: Uncaught Error: Class 'MetzWeb\Instagram\Instagram' not found in C:\Users\Zera\İnstagram\Insta.php:4 Stack trace: #0 {main} thrown in C:\Users\Zera\İnstagram\Insta.php on line 4
github phpstorm
1个回答
0
投票

我解决了。

即使您使用“ use ......”添加库,也需要制作

require "the source path of the class"
© www.soinside.com 2019 - 2024. All rights reserved.