一、打开cmd,修改目录指向自己制定的目录
二、输入命令:composer require smarty/smarty
三、在页面载入smarty文件require __DIR__.'/vendor/autoload.php';
然后new Smarty();