PHP 函数:strip_tags(string,allow)
- string 必需。规定要检查的字符串。
- allow 可选。规定允许的标签。这些标签不会被删除
例子:
<?php
echo strip_tags("Hello <b><i>world!</i></b>","<b>");
?>
输出结果:Hello world!
应用场景:评论留言处理,索引文章内指定内容
PHP 函数:strip_tags(string,allow)
例子:
<?php
echo strip_tags("Hello <b><i>world!</i></b>","<b>");
?>
输出结果:Hello world!
应用场景:评论留言处理,索引文章内指定内容
PHP使用file_get_contents函数抓取 https 网站网页内容时出错,可采用以下两种方法: 阅读全文
MySQL 批量更换指定字符串的函数:replace(str,old_string,new_string),比如全站开启https时,需要将原有的http替换为https就可以使用replace函数,直接在数据库中执行replace函数即可,简单快捷。 阅读全文
Nginx解除上传文件大小限制,修改nginx.config和php.ini两个文件,nginx.config 路径地址:/etc/nginx/nginx.config,php.ini路径地址:/etc/php.ini。 阅读全文