【php函数】根据ip获取位置和城市,经纬度

  • kn
  • 2019-06-29 15:27:05
  • php
function getcityfromip($ip) {     $arr = json_decode(@file_get_contents('http://ip.taobao.com/service/getIpInfo.php?ip=' . $ip), true); &nb
阅读全文

【php函数】只编码url中的中文字符

  • kn
  • 2019-06-26 16:17:10
  • php
function urlencode_ch($str) {     return preg_replace_callback('/[^\0-\127]+/', 'callback', $str); } function callback($match) { &nbs
阅读全文

批量下载喜马拉雅音频

  • kn
  • 2019-06-20 14:28:59
  • 其他
1.urlhttps://www.ximalaya.com/revision/play/album?albumId=14381026&pageNum=1&sort=1&pageSize=30
阅读全文

【php函数】base64上传图片

  • kn
  • 2019-06-19 13:24:08
  • php
1.base64public function uploadimgfrombase64()     {         $param = $this->request->param();   &nb
阅读全文

anaconda使用pip安装 https错误

  • kn
  • 2019-06-14 15:38:19
  • python
使用国内源,顺便忽略httpspip install pymongo -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
阅读全文

git常用命令

  • kn
  • 2019-06-03 07:46:41
  • 工具
1.本地初始化git config --global user.email "renakeji@163.com" git config --global user.name "renakeji" git init2.拉取远程代码,master 分支git&nbs
阅读全文

不错的cmd命令

  • kn
  • 2019-06-01 09:56:46
  • 其他
1.将所有的文件名批量导入到txt中dir /b/s/p/w *.jpg > pos.txt
阅读全文

anaconda 切换到默认源

  • kn
  • 2019-05-30 17:23:35
  • python
conda config --remove-key channels
阅读全文

【php函数】隐藏部分字符串

  • kn
  • 2019-05-20 15:04:10
  • php
function func_substr_replace($str, $replacement = '*', $start = 1, $length = 3)     {      &nbs
阅读全文

【php函数】抓取远程图片

  • kn
  • 2019-05-20 15:02:57
  • php
function saveRemote($fieldName, $savePath = 'temp/'){         $allowFiles = [".png", ".jpg",&nbs
阅读全文
  • «
  • 1
  • 2
  • ...
  • 26
  • 27
  • 28
  • 29
  • 30
  • ...
  • 41
  • 42
  • »