���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/st2/vendor/league/plates/docs/engine/ |
--- layout: default permalink: engine/file-extensions/ title: File extensions --- File extensions =============== Plates does not enforce a specific template file extension. By default it assumes `.php`. This file extension is automatically appended to your template names when rendered. You are welcome to change the default extension using one of the following methods. ## Constructor method ~~~ php // Create new engine and set the default file extension to ".tpl" $template = new League\Plates\Engine('/path/to/templates', 'tpl'); ~~~ ## Setter method ~~~ php // Sets the default file extension to ".tpl" after engine instantiation $template->setFileExtension('tpl'); ~~~ ## Manually assign If you prefer to manually set the file extension, simply set the default file extension to `null`. ~~~ php // Disable automatic file extensions $template->setFileExtension(null); // Render template echo $templates->render('home.php'); ~~~