私はcodeigniterを初めて使用します。私はjFormerが好きで、jFormerをjFormerと統合するための最良の方法は何でしょうか。
jFormerに代わる他のどのような方法をお勧めしますか?
私はcodeigniterを初めて使用します。私はjFormerが好きで、jFormerをjFormerと統合するための最良の方法は何でしょうか。
jFormerに代わる他のどのような方法をお勧めしますか?
jFormerのドキュメントを見ると、スマートな統合を作成したのと同じようなものが必要になります。
// File libraries/Smarty_tpl.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
//smarty class
require "/usr/share/php/smarty3/libs/Smarty.class.php";
class Smarty_tpl extends Smarty {
function __construct(){
parent::__construct();
$smarty_dir = "/usr/share/php/smarty3/libs/";
$this->setTemplateDir(APPPATH."views/templates");
$this->setCompileDir(APPPATH."views/templates_c");
$this->setCacheDir(APPPATH."views/cache");
$this->setConfigDir(APPPATH."views/config");
$this->setPluginsDir(array("$smarty_dir/plugins","$smarty_dir/sysplugins/"));
$this->compile_check= true;
$this->force_compile= true;
$this->caching= false;
$this->cache_lifetime= 86400;
}
}
そしてそれは使用法です:
$this->load->library("smarty_tpl");
$this->smarty_tpl->display("myform.tpl");
css
そしてもちろん、ファイルを含めることを忘れないでくださいjs
!