踩坑总结 第10页
做网站时经常犯的错误总结…..不是很全,仅记录了自己开发时所遇到的问题
使用 htmlspecialchars转义数据库里的文章-红穆笔记

使用 htmlspecialchars转义数据库里的文章

小记一下使用 htmlspecialchars_decode()函数将转义字符还原为HTML标签 $str = '<p><span style=";font-family:微软雅黑;font-size:16px">&...
红穆的头像-红穆笔记钻石会员红穆4年前
011814
file_get_contents页面出现错乱解决办法-红穆笔记

file_get_contents页面出现错乱解决办法

我的页面是utf-8,file_get_contents的页面是gb2312,输出时中文乱码。 解决方法如下:复制代码 <?php header("Content-Type:text/html;charset=utf-8"); $keyworld="煤层&qu...
红穆的头像-红穆笔记钻石会员红穆4年前
016610
浏览器User-Agent总结-红穆笔记

浏览器User-Agent总结

一、基础知识篇: Http Header之User-Agent User Agent中文名为用户代理,是Http协议中的一部分,属于头域的组成部分,User Agent也简称UA。它是一个特殊字符串头,是一种向访问网站提供你所使...
红穆的头像-红穆笔记钻石会员红穆4年前
039711
file_get_contents的优化替代函数-红穆笔记

file_get_contents的优化替代函数

curl()比file_get_contents()快几倍. function curl_file_get_contents($durl) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $durl); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_seto...
红穆的头像-红穆笔记钻石会员红穆4年前
01299
回到顶部侧边按钮-红穆笔记

回到顶部侧边按钮

1.html <dl class="toolbar"> <dd class="qq"><a href="tencent://message/?uin=123456&Menu=yes"><i></i><span>在线...
红穆的头像-红穆笔记钻石会员红穆4年前
09113
curl post提交例子-红穆笔记

curl post提交例子

<?php $host = "/"; $path = "/wyc/title"; $method = "POST"; $apikey = "你要调用API的apikey"; $headers = array(); array_push($headers, &quo...
红穆的头像-红穆笔记钻石会员红穆4年前
01526
网站侧边客服代码 折叠式 圆球客服展示-红穆笔记

网站侧边客服代码 折叠式 圆球客服展示

首先是html代码:<section id="cebian"> <div class="all close"> <div class="shang"> <div class="mune"> <p>Chat w...
红穆的头像-红穆笔记钻石会员红穆4年前
01308
仿写一个抖音footer的底部 html-红穆笔记

仿写一个抖音footer的底部 html

css代码:* { box-sizing: border-box; margin: 0; padding: 0; } a { text-decoration: none; color: #fff } #footers .footer { background: #171725; min-height: 188px; font-size: 14px; c...
红穆的头像-红穆笔记钻石会员红穆4年前
08010
网站接入百度地图-红穆笔记

网站接入百度地图

现在html里面定义一个id盒子<div id="maps"></div>接下来引入百度js文件:<script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=IqqChZ4B0uzoth1C2...
红穆的头像-红穆笔记钻石会员红穆4年前
01125
layer.msg无效原因-红穆笔记

layer.msg无效原因

原因一:同时引入多版本layui原因二:scripts写法错误:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <title>登陆<...
红穆的头像-红穆笔记钻石会员红穆4年前
05129
HTML <video> 标签-红穆笔记

HTML <video> 标签

实例一段简单的 HTML5 视频:<video src="movie.ogg" controls="controls">您的浏览器不支持 video 标签。</video>定义和用法<video> 标签定义视频,比...
红穆的头像-红穆笔记钻石会员红穆4年前
015315
HTML表单常用标签-红穆笔记

HTML表单常用标签

文本输入框 <input type="text" name="uname" value="" placeholder="请输入您的用户名" />密码输入框<input type="password" nam...
红穆的头像-红穆笔记钻石会员红穆4年前
013514