运维开发技巧

经过shell脚本获取到相应的数据,而后导入到数据库中,用PHP代码实现页面体验的步骤mysql

  1. 编写shell脚本,获取相应信息
    sql

  2. 经过load data infile 'filename' into table tablename;把所得信息导入的数据库中shell

    具体参数详见笔记 load data 的具体使用方法
    数据库

  3. 利用PHP代码把所须要的信息体如今页面中ide

注:mysql导入信息
ci

load data infile 'filename' into table tablename [option]字符串

option 参数string

fields terminated by 'string'    //字段分割符,默认指表符 '\t'it

fields [optionally] enclosed by 'char' //字段引用符,若是加optionally只在char,varchar,text等类型上加,默认不使用io

 fileds escaped by 'char'   //转义字符,默认\

 lines starting by 'string'  //每行前加字符 ''

 lines terminated by 'string'  //行未加字符串  默认\n 

 ignore number lines   //number 表明数字,忽略导入数据的前几行

 set 列名=exp   //将某个列转换后再加载

相关文章
相关标签/搜索