$smarty->setCompileDir('/path/to/compiled/templates');
$smarty->setCompileDir('/var/www/myapp/templates_c');This code sets the path to the templates_c directory, where compiled templates will be stored. This function is part of the Smarty PHP template engine package.