/** * curl 抓取图片 * @param $url * @return mixed */ public static function downLoadImage($url) { $header = array('Expect:'); $ch = curl_init(); curl_s... ...
分类:
Web程序 时间:
2017-05-15 19:41:56
阅读次数:
164
1.函数的作用:用函数迭代数组的所有元素 2.函数的参数: @params array $array 用于迭代的数组 @params callable $callback 迭代的函数 @params mixed $initial 迭代的初始值 ,默认为NULL 3.例子: ...
分类:
Web程序 时间:
2017-05-13 23:20:13
阅读次数:
260
<?php/** * * @author Administrator * mysqli_conncet() obj * mysqli_set_charset() bool * mysqli_query() mixed 输入bool 输出result_obj * mysqli_fetch_array( ...
分类:
数据库 时间:
2017-05-06 18:59:07
阅读次数:
262
http_build_query()函数的作用是使用给出的关联(或下标)数组生成一个经过 URL-encode 的请求字符串。 写法格式:http_build_query ( mixed $query_data [, string $numeric_prefix [, string $arg_sep ...
分类:
Web程序 时间:
2017-05-05 12:52:57
阅读次数:
160
直接上代码吧:if(count($array)==count($array,1)){
echo‘一维数组‘;
}else{
echo‘多维数组‘;
}看了下手册intcount(mixed$array_or_countable[,int$mode=COUNT_NORMAL])如果可选的mode参数设为COUNT_RECURSIVE(或1),count()将递归地对数组计数。对计算多维数组的所有单元尤其..
分类:
编程语言 时间:
2017-05-04 16:15:39
阅读次数:
125
1.函数的作用:返回数组的键值 2.函数的参数: @params array $array 返回键值的数组 @params mixed $search 如果指定,具有此值的键值被返回 @params bool $strict 是否执行严格的类型检查 3. 例子一: ...
分类:
Web程序 时间:
2017-05-04 00:02:00
阅读次数:
133
MySQL主主同步主主同步原理同主从,不过是双向而已1.修改1.4配置文件vim/etc/my.cnf
#同时开始binlog和relaylog
log-bin=mysql-bin
binlog_format=mixed
server-id=1
sync_master_info=1
sync_binlog=1
innodb_support_xa=ON
relay_log=relay-log
relay_log_index=relay-log.in..
分类:
数据库 时间:
2017-05-01 20:59:50
阅读次数:
209
题目描述 Each of Farmer John's N (4 <= N <= 16) cows has a unique serial number S_i (1 <= S_i <= 25,000). The cows are so proud of it that each one now we ...
分类:
其他好文 时间:
2017-04-29 23:24:58
阅读次数:
207
1.函数的作用:用指定的值填充数组; 2.函数的参数: @params int $start_index 起始索引 @params int num 填充的个数 @params mixed 用来填充的值 3.注意点: 1)num参数只能为大于等于0的正数; 4.例子: 例子一: 例子二: ...
分类:
Web程序 时间:
2017-04-24 00:11:53
阅读次数:
191
array_rand — 从数组中随机取出一个或多个单元 array_rand — 从数组中随机取出一个或多个单元 mixed array_rand ( array $array [, int $num = 1 ] ) 从数组中取出一个或多个随机的单元,并返回随机条目的一个或多个键。 注意这里是随机 ...
分类:
其他好文 时间:
2017-04-21 21:25:58
阅读次数:
95