Quantcast
Channel: PHP+MySQL –任鸟飞— 专注网页设计 海阔凭鱼跃 天高任鸟飞
Browsing latest articles
Browse All 28 View Live

nginx.config 配置文件修改客户端上传文件大小限制

Nginx解除上传文件大小限制,修改nginx.config和php.ini两个文件,nginx.config 路径地址:/etc/nginx/nginx.config,php.ini路径地址:/etc/php.ini。 php.ini修改内容如下: upload_max_filesize =100M post_max_size = 100M memory_limit = 100M...

View Article


MySQL replace() 函数批量替换数据库中指定字符串

MySQL 批量更换指定字符串的函数:replace(str,old_string,new_string),比如全站开启https时,需要将原有的http替换为https就可以使用replace函数,直接在数据库中执行replace函数即可,简单快捷。 replace(str,old_string,new_string) 参数说明: str:字段 old_string:旧的字符串...

View Article


PHP strip_html_tags 函数 删除 指定的 HTML 标签及标签内内容

删除HTML标签和标签的内容。 使用方法:strip_html_tags($tags,$str) $tags:需要删除的标签(数组格式) $str:需要处理的字符串; function strip_html_tags($tags,$str){ $html=array(); foreach ($tags as $tag) {...

View Article

PHP file_get_contents函数抓取https地址出错的解决方法 curl_init()

PHP使用file_get_contents函数抓取 https 网站网页内容时出错,可采用以下两种方法: 方法一: 打开php.ini找到 ;extension=php_openssl.dll ,去掉双引号”;” ,重启web服务器即可。 方法二: <?php //file_get_contents抓取https地址内容 function getCurl($url){ $ch =...

View Article

PHP strip_tags() 函数剥去(可以保留指定的标签)字符串中的 HTML、XML 以及 PHP 的标签

PHP 函数:strip_tags(string,allow) string 必需。规定要检查的字符串。 allow 可选。规定允许的标签。这些标签不会被删除 例子: <?php echo strip_tags("Hello <b><i>world!</i></b>","<b>"); ?> 输出结果:Hello world!...

View Article

Browsing latest articles
Browse All 28 View Live