泡面师

  • 首页
  • 记录
PHP
PHP

laravel7的日期格式问题

laravel7.x之前时间格式为 2020-07-11 23:27:16 laravel7.x之后时间格式为 2020-07-11T23:27:16.000000Z 如果7.x版本想显示之前的时间格式 在model文件中加入 use DateTimeInterface; protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); }

2020-07-15 0条评论 5109点热度 17人点赞 泡面师 阅读全文
PHP

oneinstack php增加fileinfo扩展

解压源文件 cd /home/oneinstack/src tar -zxvf php-7.0.32.tar.gz 生成configure文件 cd /home/oneinstack/src/php-7.0.32/ext/fileinfo 执行 /usr/local/php/bin/phpize 编译安装 ./configure --with-php-config=/usr/local/php/bin/php-config make && make install 开启扩展 /usr/local/p…

2018-11-04 0条评论 4369点热度 0人点赞 泡面师 阅读全文
PHP

64位win10搭建react-native

1、安装nodejs  https://nodejs.org/en/ 2、npm仓库源替换为国内镜像 $ npm config set registry https://registry.npm.taobao.org --global $ npm config set disturl https://npm.taobao.org/dist --global 3、安装JAVA JDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downlo…

2017-08-25 0条评论 3360点热度 0人点赞 泡面师 阅读全文
PHP

PHP json_encode返回数据问题

PHP json_encode之后返回的数据,客户端接收时明明是正常的json格式(肉眼看到的是正常的),实际上比正常的多了3个字节 如 {"code":0,"default":1,"next":"www.lgzyw.com"} 客户端用json_decode之后是null 用JSON在线解析工具解析发现报错 Unexpected token in JSON at position 0 这应该就是传说中的BOM问题 把接收到的字符串处理一下 if(preg_match('/^\xEF\xBB\xBF/',$json…

2017-07-17 0条评论 3749点热度 4人点赞 泡面师 阅读全文
分类
  • centos (13)
  • golang (2)
  • PHP (4)
  • python (10)
  • 记录 (5)
最新 热点 随机
最新 热点 随机
golang使用mysql连接池 golang使用redis连接池 laravel7的日期格式问题 pyinstaller打包pyqt5后的程序报错Failed to execute script mac使用iterm2进行rzsz 网站设置301重定向
centos下Flask使用任务队列celery centos用pip安装python-mysql报错 安装selenium和chromedriver centos7 git服务端配置 pyinstaller打包pyqt5后的程序报错Failed to execute script centos安装supervisor
标签聚合
golang mysql go-redis redigo iterm2 scrapy redis git Flask centos

COPYRIGHT © 2024 泡面师. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS