会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
PHPer100
博客园
首页
新随笔
联系
订阅
管理
2020年6月4日
PHP curl上传图片
摘要: 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
阅读(1282)
评论(0)
推荐(0)
2020年4月15日
go-micro 报500
摘要: 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
阅读(1476)
评论(0)
推荐(0)
2020年3月12日
PHP this、self与static的区别
摘要: /** * 父类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
阅读(897)
评论(0)
推荐(0)
2019年12月25日
负数求余
摘要: 公式: a-a/b*b; <?php echo -5 % 3; //结果为-2; -5 - (-5)/3 * 3 => -5 - (-1) * 3 => -2;
阅读全文
posted @ 2019-12-25 18:56 PHPer100
阅读(293)
评论(0)
推荐(0)
2019年7月20日
前端语音提醒
摘要: iNotifyjs下载链接:https://www.oschina.net/p/iNotifyjs
阅读全文
posted @ 2019-07-20 20:31 PHPer100
阅读(479)
评论(0)
推荐(0)
PHP-删除文件夹
摘要: /** * 删除缓存目录 * @param $dirname * @return bool */ function delCache($dirname) { $result = false; if (!is_dir($dirname)) { echo " $dirname is not...
阅读全文
posted @ 2019-07-20 20:25 PHPer100
阅读(2036)
评论(0)
推荐(0)
2019年7月16日
PHP--foreach的问题
摘要: "; $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
阅读(287)
评论(0)
推荐(0)
2019年7月10日
PHP--修改数据库表前缀
摘要: $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
阅读(824)
评论(0)
推荐(0)
2019年7月6日
python--mysql的CURD操作
摘要: 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
阅读(614)
评论(0)
推荐(0)
python--防止SQL注入
摘要: 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
阅读(348)
评论(0)
推荐(0)
下一页
公告