1
私が持っているSymfony2のエラーTCPDFバンドルしてPDFファイルを生成しながら、PDFを生成するための私の小枝テンプレートで
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: getimagesize(/bundles/wrbmcisintranetsite/images/no_avatar.jpg): f
ailed to open stream: No such file or directory
Exception trace:
() at /var/www/site/vendor/tecnickcom/tcpdf/include/tcpdf_images.php:171
Symfony\Component\Debug\ErrorHandler->handleError() at n/a:n/a
getimagesize() at /var/www/site/vendor/tecnickcom/tcpdf/include/tcpdf_images.php:171
そして、私はexmpleのために、この画像が保存されているパスを変更する場合:
<img src="{{ asset('var/storage/images/no_avatar.jpg') }}">
とを使用せずにそのファイルをコピーしますそれは働き、イメージは出力PDFファイルで見ることができます。 にファイルを入れて、assets:install
で
詳細情報:あなたのケースで
は、一例として
absolute_url
で試すことができます。パスが正しいかどうかを確認しますか?コマンドのアセットを確認してください:install webはすべてのアセットをWebディレクトリの下にインストールしていますか? –