โดย jamepiyawat » 26/11/2019 1:44 pm
ผมต้องการที่จะเชื่อม template engine twig ไฟล์ที่อยู่ในโฟร์เดอร์ template แต่กลับ error ครับเป็นเพราะอะไร ครับ
โค้ด
โค้ด: เลือกทั้งหมด
$loader = new \Twig\Loader\FilesystemLoader('invoice');
$twig = new \Twig\Environment($loader, [
'cache' => 'invoice/cache',
]);
- Selection_999(1868).png (6.08 KiB) Viewed 977 times
ผมต้องการที่จะเชื่อม template engine twig ไฟล์ที่อยู่ในโฟร์เดอร์ template แต่กลับ error ครับเป็นเพราะอะไร ครับ
[attachment=0]Selection_999(1867).png[/attachment]
โค้ด
[code]
$loader = new \Twig\Loader\FilesystemLoader('invoice');
$twig = new \Twig\Environment($loader, [
'cache' => 'invoice/cache',
]);
[/code]
[code]
echo $twig->render('invoice.html', [
[/code]
[attachment=1]Selection_999(1868).png[/attachment]