上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页
摘要: function DeleteHtml($str) { /*$str=preg_replace("/\s+/", " ", $str); //过滤多余回车 $str=preg_replace("/<[ ]+/si","<",$str); //过滤<__("<"号后面带空格) $str=preg_re 阅读全文
posted @ 2018-12-06 13:23 yahn~ 阅读(2991) 评论(0) 推荐(0) 编辑
摘要: function DeleteHtml(){ //清除空格和换行 $str = trim($str); //清除字符串两边的空格 $str = strip_tags($str,""); //利用php自带的函数清除html格式 $str = preg_replace("/\t/","",$str); 阅读全文
posted @ 2018-12-06 12:03 yahn~ 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 两个源文件11.html和test.html 基本是一样的,现在需要匹配相似度的百分比,并且引入Simple_html_dom.php文件进行去标签处理,代码如下: <?php include 'Simple_html_dom.php';$str = file_get_contents("11.ht 阅读全文
posted @ 2018-12-06 10:15 yahn~ 阅读(584) 评论(0) 推荐(0) 编辑
摘要: 把htdocs 目录软连接到根目录 ln -s /Applications/MAMP/htdocs /Users/yanruicheng 上述命令成功后,ls 查看,然后cd 便可以进入这个目录了。 阅读全文
posted @ 2018-12-05 22:50 yahn~ 阅读(20686) 评论(1) 推荐(1) 编辑
摘要: <?php class AppConst{ const user=11; public static $arr = [ 'name'=>'张三', 'title'=>'测试', ];}$a = AppConst::user;// var_dump($a);$b = AppConst::$arr;va 阅读全文
posted @ 2018-12-05 15:37 yahn~ 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 调用代码如下: <?php require 'simple_html_dom.php';$str = file_get_contents('11.html');$dom = str_get_html($str);//显示界面echo $dom;//这里打印出来是文件源码echo highlight_ 阅读全文
posted @ 2018-12-05 14:22 yahn~ 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 复制一个文件到服务器 scp -p 22 /Applications/MAMP/htdocs/h.php root@47.101.131.113://var/www/html 上面往往是端口,root开始是服务器的帐号和根目录,我的是apache所以根目录在/var/www/html目录下面,h.p 阅读全文
posted @ 2018-11-30 10:36 yahn~ 阅读(1256) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-11-30 09:08 yahn~ 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-11-26 14:57 yahn~ 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 我用集成环境mamp刚装了扩展,惊讶地发现<?php info;?> 在浏览器里已经有mongodb了,但是mac 终端PHP -m 里没有,这个时候执行which php 查看一下路径,发现路径是我设置的默认的PATH。 网上查看各种操作都无济于事,php -m 还是没有mongodb扩展,于是执 阅读全文
posted @ 2018-11-23 10:03 yahn~ 阅读(482) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页