摘要: function sendPost($url, $path) { $curl = curl_init(); if (class_exists('\CURLFile')) { //PHP版本 >= 5.5 curl_setopt($curl, CURLOPT_SAFE_UPLOAD, true); $ 阅读全文
posted @ 2020-06-04 14:32 PHPer100 阅读(1256) 评论(0) 推荐(0) 编辑
摘要: server.go package main import ( "github.com/gin-gonic/gin" "github.com/micro/go-micro/registry" "github.com/micro/go-micro/web" "github.com/micro/go-m 阅读全文
posted @ 2020-04-15 14:18 PHPer100 阅读(1449) 评论(0) 推荐(0) 编辑
摘要: /** * 父类P中 获取子类C的类名 */class P{ public static function getParent() { return self::class; } public static function getChild() { return static::class; } 阅读全文
posted @ 2020-03-12 10:30 PHPer100 阅读(887) 评论(0) 推荐(0) 编辑
摘要: 公式: a-a/b*b; <?php echo -5 % 3; //结果为-2; -5 - (-5)/3 * 3 => -5 - (-1) * 3 => -2; 阅读全文
posted @ 2019-12-25 18:56 PHPer100 阅读(281) 评论(0) 推荐(0) 编辑
摘要: iNotifyjs下载链接:https://www.oschina.net/p/iNotifyjs 阅读全文
posted @ 2019-07-20 20:31 PHPer100 阅读(470) 评论(0) 推荐(0) 编辑
摘要: /** * 删除缓存目录 * @param $dirname * @return bool */ function delCache($dirname) { $result = false; if (!is_dir($dirname)) { echo " $dirname is not... 阅读全文
posted @ 2019-07-20 20:25 PHPer100 阅读(2028) 评论(0) 推荐(0) 编辑
摘要: "; $data = ['a', 'b', 'c']; foreach($data as $key => $val){ $val = &$data[$key]; } echo "1."; var_dump($data); // 打印结果 // array(3) { [0]=> string(1) "b" [1]=> string(1) "c" [2]=> &string(1) "c" } /... 阅读全文
posted @ 2019-07-16 22:53 PHPer100 阅读(281) 评论(0) 推荐(0) 编辑
摘要: $v){ $preg = preg_match("/^($old_prefix{1})([a-zA-Z0-9_-]+)/i", $v[0], $v1); if($preg){ $tab_name[$k] = $v1[2]; } } if($preg){ foreach($tab_name as $k => $v)... 阅读全文
posted @ 2019-07-10 10:33 PHPer100 阅读(815) 评论(0) 推荐(0) 编辑
摘要: from pymysql import * def main(): # 创建Connextion连接 conn = connect(host='localhost', port=3306, user='root', password='', database='test', charset='utf8') # 获取Cursor对象 cursor = conn.... 阅读全文
posted @ 2019-07-06 23:07 PHPer100 阅读(598) 评论(0) 推荐(0) 编辑
摘要: from pymysql import * def main(): # 创建Connextion连接 conn = connect(host='localhost', port=3306, user='root', password='', database='test', charset='utf8') # 获取Cursor对象 cursor = conn.... 阅读全文
posted @ 2019-07-06 22:59 PHPer100 阅读(336) 评论(0) 推荐(0) 编辑