且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SplFileObject错误无法打开流:没有这样的文件或目录

更新时间:2021-07-14 22:46:03

尝试

 $icon = new Image('%kernel.root_dir%/appassBundle/Resources/Images/icon.png', 'icon');

或者也许:

$iconPath = $this->get('kernel')->getRootDir().'/appassBundle/Resources/Images/icon.png';
$icon = new Image($iconPath, 'icon');

类似,我看不到您项目的整个结构.

Or similar, I don't see whole structure of your project.