随笔分类 - php
摘要://格式化输出函数 function p( $temp){ echo "<pre/>"; print_r($temp); die; }
阅读全文
摘要:解决办法 delete from `phome_ecms_news_index` where id not in(select id from phome_ecms_news)
阅读全文
摘要:本代码适合查找网站挂马(木马)文件使用 <?php function listPhpFiles($directory) { $fileList = []; $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator
阅读全文
摘要:1、找到config.json,在配置文件中新增水印效果 /* 上传图片配置项 */ "imageWater": "true",/*******************新增图片水印设置 这里是新增*/ "imageActionName": "uploadsimage", /* 执行上传图片的acti
阅读全文
摘要:去除内容多余样式php函数-文章来源 植物号 www.zhiwuhao.com function KillStyle($content) { $content = preg_replace("/STYLE=.+?['|\"]/i",'',$content);//去除样式 $content = pre
阅读全文
摘要:需要在api/extend.func.php 文件中加入的函数 function time_tran($the_time) { $now_time = time(); $show_time = strtotime($the_time); $dur = $now_time - $show_time;
阅读全文
摘要:今天应一个朋友请求,要求写个5118的伪原创插件,他的接口输出的默认是json形式输出,很不方便,要提取里面伪原创的结果,并附上代码。 <?php $host = "http://apis.5118.com"; $path = "/wyc/rewrite"; $method = "POST"; $a
阅读全文
摘要:最近我的博客站在升级更新中,需要显示帝国cms热门搜索词,这里介绍两种调用方法。 方法一:是动态调用,通过帝国cms自带JS来调用; 方法二:是静态调用,通过帝国cms灵动标签查询数据库来静态调用。 方法一动态调用帝国cms热门搜索词,通过帝国cms自带JS来调用。 具体的操作步骤: 第一步:帝国c
阅读全文
摘要:<?php //检则标题重复 $sql=$empire->query("select id,filename from phome_ecms_news where classid=29 group by filename having(count(*))>2"); while($r=$empire-
阅读全文
摘要:alter table phome_ecms_news auto_increment=1; alter table phome_ecms_news_check auto_increment=1; alter table phome_ecms_news_check_data auto_incremen
阅读全文
摘要:帝国CMS搜索模板不支持动态标签调用,从7.0到7.2再到刚发布的7.5,帝国官方团队始终没解决这个问题,这很不方便,但是帝国的强大可以让我们忽略这个问题,今天老威就把这个bug的解决方法说一下。 第一种方法:把导航和需要动态调用的地方都写成静态的,因为毕竟搜索页面用的人不是很多,搜索功能能实现就可
阅读全文
摘要:update phome_ecms_news_check set filename= replace(filename,'Under4-',''); update phome_ecms_news_check set title= replace(title,'Under4 ',''); update
阅读全文
摘要:$str=' <p> </p><p> </p><p> </p><p> </p><p><strong><span style="font-size: 18px;">Factory Supply High Quality Maitake Mushroom Extr
阅读全文
摘要:<?php header('content-type:text/html; charset=utf8'); define('TOKEN', 'youtoken'); // TOKEN define('APP_ID', 'youid'); // 开发者AppID,服务号可获取 define('APP_
阅读全文
摘要:我们常用dedecms 自定义表单做留言功能。但是偶尔会遇到这样一个问题,就是 在前台提交表单后。。后天显示不全。特别是中文字符 都不会显示, 比如下图: 这是因为 如果你织梦是gbk的话那就对了 是htmlspecialchars这个函数的原因 默认是utf8 如果不想换php版本的话就把html
阅读全文

浙公网安备 33010602011771号