個人web框架php
==========================================================css
前端:css(bootstrap,本身的代碼片斷),js(jquery,本身的代碼片斷),html,交互設計。html
1 <?php 2 3 //建立smarty對象 4 require_once './libs/Smarty.class.php'; 5 6 $smarty = new Smarty;//創建smarty實例對象$smarty 7 $smarty -> caching = false;//是否使用緩存 8 $smarty -> template_dir = "./templates";//設置模板目錄 9 $smarty -> compile_dir = "./templates_c";//設置編譯目錄 10 $smarty -> cache_dir = "./smarty_cache";//緩存文件夾 11 //修改左右邊界符號 12 $smarty -> left_delimiter="<{"; 13 $smarty -> right_delimiter="}>"; 14 15 $smarty -> assign("var1","hello world");// 16 $smarty -> display("hello.tpl");// 17 18 ?>
smarty模板操做變量:前端
http://www.cnblogs.com/snowinmay/p/3170092.htmlmysql
smarty模板的內置函數:jquery
1 建立數據庫: 2 create database books; 3 建立用戶: 4 mysql> grant select,insert,delete,uptate 5 -> on books.* 6 -> to dada identified by 'yujianqi2011'; 7 8 使用數據庫: 9 use dbname; 10 use dada; 11 12 新建數據庫表 13 create table tablename(columns); 14 create table demo( 15 userid int unsigned not null auto_increment primary key, 16 username char(50) not null, 17 password char(20) not null, 18 age int not null, 19 city char(20) not null 20 ); 21 22 顯示數據庫表 23 show tables; 24 25 在數據庫中插入數據 26 insert into demo values(NULL,"dada","yujianqi2011",27,"beijing"); 27 insert into demo values(NULL,"xiaoyin","yujianqi2011",26,"shanghai"); 28 29 查詢數據 30 select name, city from customers where name="dada"; 31 32 更新數據 33 update customers 34 set address = "北京市海淀區"; 35 36 刪除數據 37 delete from dada where name = "dada"; 38 39 表的刪除 40 DROP TABLE table; 41 42 數據刪除 43 DROP DATABASE database;