location /chat { proxy_set_header Connection ""; proxy_http_version 1.1; chunked_transfer_encoding off; proxy_buffering off; proxy_cache off; proxy_read_timeout 1h; proxy_pass http://xxx.xx/path/to/sse; }
location ~* \.(eot|otf|ttf|woff|woff2)$ { add_header Access-Control-Allow-Origin *; expires max; }
由于项目需要,有些内容固定了。 function sharePNG($id, $avatarPath = '', $name = '', $desc = '') { if(substr($avatarPath,0,2) == '//'){ $avatarPath = (\request()->protocol() == 'HTTP/1.1'?'http':'https').":$avatarPath"; } $len = mb_strlen($name); if($len > 11){ $name = mb_substr($name,0,11).'...'; } $path = public_path("/static")
话不多说上代码function radius_img($imgpath, $radius = 0){ $index = strpos($imgpath,"?"); if($index !== false){ $imgpath = substr($imgpath,0,$index); } $ext = pathinfo($imgpath); $src_img = null; switch ($ext['extension']){ case 'jpg': case 'jpeg': $src_img = imagecreatefromjpeg($imgpath); break; case 'png': $src_img = imagecreatefrompng($imgpath); bre
事发系统为centos7。# 安装ca证书工具 yum install ca-certificates -y # 更新证书 update-ca-trust参考PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL
风里来
最后,我终于解放了我自己……