所以我试图调用邮件程序类的一些功能。
在phpStorm中输入GhostMailer::setSender();
当我点击GhostMailer所在的GhostMailer::
文本上的滚动按钮时,我可以导航到该文件,但每当我运行该程序时,它都会显示找不到类GhostMailer ..
致电代码
GhostMailer::setSender(Input::get('emailfrom'));
GhostMailer::addRecipient(Input::get('emailto'));
GhostMailer::setSubject(Input::get('subject'));
GhostMailer::setHTML(true);
GhostMailer::setMessage(Input::get('email'));
GhostMailer::setReturnAddress(Input::get('emailfrom'));
GhostMailer::getHeaders();
GhostMailer::send();
我该如何解决这个问题?
答案 0 :(得分:1)
这听起来像类(文件)实际上没有加载,因此该类在运行时不存在。
将"app/classes"
添加到classmap
中的composer.json
数组,然后运行composer dump-autoload
,您应该很高兴