Smarty template path configuration problem (urgent) smarty was installed yesterday, but encountered problems when configuring the template path. Define ("ROOT", & nbsp; str_replace ("\", & nbsp; "/", & nbsp; dirname (_ FILE __)). '/'); require & nbsp; 'libs Smarty template path configuration problem (urgent)
Smarty was installed yesterday, but encountered problems when configuring the template path.
Define ("ROOT", str_replace ("\", "/", dirname (_ FILE __)).'/');
Require 'libs/Smarty. class. php ';
$ Smarty = new Smarty ();
$ Smarty-> setTemplateDir (ROOT. 'Templates /');
Print_r ($ smarty-> getTemplateDir ());
The output template path is as follows:
F:/PHP program/Smarty/templates \
That is, how can I tune the last path separator? Smarty PHP shared:
------ Solution --------------------
No need to change!
In linux, the path character is/
The default path character in window is \ supported at the same time/