المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : شرح اضافة php داخل tpl فى سكربت whmcs بكود smarty



Rise Company
22-05-2018, 04:17
شرح اضافة php داخل tpl فى سكربت whmcs بكود smarty
Allow Smarty PHP tags
How to include a php file inside tpl
Using PHP code in Smarty tpl FIle
How to write php code in .tpl files?

https://www.rise.company/upload/uploads/1526955030331.jpg

اولا يتم تفعيل Allow Smarty PHP Tags

يتم الذهاب الى setup ثم General Settings ثم Security

وهيكون فى الاسفل اختيار Allow Smarty PHP Tags

معمول disabled اجعله enabled

ثانيا وضع كود php دخل tpl

ضع الكود كنص او ضعه ليقرا من ملف

امثلة :


{php}
ini_set('date.timezone', 'Egypt');
{/php}



{php}
include "livesupport.php";
{/php}

المرجع :
https://whmcs.community/topic/261677-allow-smarty-php-tags-not-recommended/
https://whmcs.community/topic/256029-add-php-code-on-tpl-files/
https://whmcs.community/topic/65469-how-to-include-a-php-file-inside-tpl/
https://www.smarty.net/docs/en/language.function.php.tpl