入门客AI创业平台(我带你入门,你带我飞行)
博客笔记
08
2016-06
yii2框架-formatter格式化(九) 2016-06-08
yiii18nFormatter是一个格式化的小助手,对于我们实现前端用户友好的显示有非常大的帮助。 一、常用的属性 (1)$dateFormat 日期格式:yyyy-MM-dd,或者 "s
08
2016-07
SQl查询数据库表名、表的列名、数据类型 2016-07-08
1.获取所有数据库名: Select Name FROM Master..SysDatabases order by Name 2.获取所有表名: (1) Select Name FROM SysObjects Where XType="U" orDER BY Name XType="U"
28
2017-02
YII2 返回文件 2017-02-28
$response = Yii::$app->getResponse(); $response->format = $response::FORMAT_RAW; $response->getHeaders()->set("Content-Type", "application/vnd.ms-excel"); $response->getHeaders()->set("Content-Disposition", "
12
2014-09
Sql Server 快速查看表结构(表描述及字段说明) 2014-09-12
快速查看表对的就说明,及表字段描述及字段类型 --表描述 SELECT tbs.name 表名,ds.value 描述 FROM sys.extended_properties ds LEFT JOIN sysobjects tbs ON ds.major_id=tbs.
28
2017-06
yii2下action下直接返回图片给浏览器 2017-06-28
直接上函数: public function actionTest() { include_once dirname(dirname(__FILE__))."/qrcode/phpqrcode.php"; $postData = @Yii::$app->request->post(); Yii::$app->response->
28
2016-08
yii2 如果需要定义字段类型,在rules中加入 2016-08-28
如果需要定义字段类型,在rules中加入: return [ [["column1"], "integer"], //[["column1"],"default","value"=> 0],// 默认值 ]; 设置默认
17
2012-04
MYSQL 查询表列数 2012-04-17
select count(*) from information_schema.columns where table_schema="db" and table_name="tb"   db是表所在的数据库名称,tb是要查询的表名        
16
2015-10
yii2-cookbook之定制response类型[翻译] 2015-10-16
以后会看心情不定时翻译github上的yii-cookbook(url: https://github.com/samdark/yii2-cookbook/tree/master/book) 英文水平有限,有错误请一定指出来. 原文地址:https://github.com/samda
18
2014-09
file_get_contents 得到https类型url失败的方法 2014-09-18
把file_get_contents改成下面的方法即可: function getSSLPage($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false)
05
2015-04
file_get_contents 无法读取https的问题解决! 2015-04-05
做微信公众平台开发,要通过读取公众平台的一个网址实时获得access_token,用了file_get_contents 在本地测试一切正常,但在服务器上却返回空数据。经