• 我的web框架


    我的web框架

    ==========================================================

    前端:css(bootstrap,自己的代码片段),js(jquery,自己的代码片段),html,交互设计。

    后端:php(数据库配置,数据操作,具体页面逻辑,控制器),smarty(smarty引用,实例化等都放到一个文件中,参考其他用smarty写的网站),mysql(常用的数据库操作语句)。
    工具:服务器php环境(擅长),用WAMP集成环境,sublime编辑器(用svn,emmet等插件),git和svn版本控制(在自己的网站中没有用到,因为需要在服务器端配置环境),photoshop,虚拟机和IETester以及其他浏览器,FlashFXP(ftp管理工具)。
    ==========================================================
     
    我的css代码片段:
     
    我的js代码片段:
     
    php代码片段:
     
    smarty代码片段:
    配置:
    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 ?>
    View Code

    smarty模板操作变量:

    http://www.cnblogs.com/snowinmay/p/3170092.html

    smarty模板的内置函数:

     
    mysql代码片段:
     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;
    View Code
     
    ==========================================================
     
    参考学习的网站:
     
    ============================
    bootstrap网站链接:http://www.bootcss.com/
     
     
     
     
    ==============================
     
    web代码分布:
     
     
     
  • 相关阅读:
    Android 对话框(Dialog)
    struts2 开发模式
    Struts2动态方法调用(DMI)
    Struts2中 Path (getContextPath与basePath)
    String path = request.getContextPath
    ios虚拟机安装(二)
    Spring MVC 的 研发之路
    Swift辛格尔顿设计模式(SINGLETON)
    【算法导论】多项式求和
    uva 11181
  • 原文地址:https://www.cnblogs.com/snowinmay/p/3181424.html
Copyright © 2020-2023  润新知