Laravel-Dompdf 超过 60 秒的最大执行时间
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49421226/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel- Dompdf Maximum execution time of 60 seconds exceeded
提问by Thanh Toàn
Here is error when i convert pdf, it's not working since i run my laravel project by "php artisan serve --port=1000
". But if i run my laravel project with xampp. it's alright. I don't know why?. Give me explaination and repairs . Thank you
这是我转换 pdf 时的错误,它不起作用,因为我通过“ php artisan serve --port=1000
”运行我的 Laravel 项目。但是如果我用 xampp 运行我的 laravel 项目。没关系。我不知道为什么?。给我解释和修理。谢谢
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
Maximum execution time of 60 seconds exceeded
回答by AddWeb Solution Pvt Ltd
Increase Your time limit in your controller file.Below variable to increase your time limit.
增加您在控制器文件中的时间限制。以下变量可增加您的时间限制。
set_time_limit(300);
回答by Rodrigo Basilio
The laravel - dompdf does not work well with php artisan serve
. You should use XAMPPor another HTTP serveryou like.
laravel-dompdf 不能很好地与php artisan serve
. 您应该使用XAMPP或其他您喜欢的HTTP 服务器。
回答by user558720
回答by SirVineyard
Possible causes:
可能的原因:
linking to external CSS- you're better off writing your css between style tags in the same file as your html
链接到外部 CSS- 最好在与 html 相同的文件中的样式标记之间编写 css
using blade templating syntaxe.g. @sections @roles, etc
使用刀片模板语法,例如@sections @roles 等
linking to external images
链接到外部图像
Complex table structures/layouts
复杂的表结构/布局
...from personal experience
...从个人经验