• cltphp发布文章显示HTML

    默认模板为{$info.content|raw}  raw是显示HTML,但{$info.content}去掉也不管用。 网上使用的方法为{$info.content|html_entity_decode}  经测试不管用。 正确使用方法为: {:html_entity_decode($info['content'])} 阅读全文
    作者:admin | 分类:cltphp | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • 解决码科代驾PC和骑手端推送及声音问题

    1、服务器安全组开启9502端口 2、BT开启9502端口 3、关闭防火墙,小编的系统是Centos7.7 默认是开机防火墙的 systemctl status firewalld.service //查看防火墙状态 systemctl stop firewalld.service //停止防火墙 systemctl disable firewalld.service //禁用防火墙服务 3、用户端和骑手端小程序后台设置9502端口 BT计划脚本开机执行: cd /www/wwwroot/wx.wmphp.com/addon...阅读全文
    作者:admin | 分类:PHP, 微擎 | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • 零点城市社交电商v1.6.2 NOAUTH Authentication required.

    零点城市社交电商微信小程序,在订单提交时,友情提示 Class 'think\cache\driver\Redis\ not found 是因为没有配置redis,找到../addons/weliam_areashop/source/thinkphp/library/think/cache/driver/Redis.php 在一看代码注释,Redis缓存驱动开发者尘缘,是我的朋友。 友情提示 NOAUTH Authentication required. 也是因为没有配置Redis缓存. 阅读全文
    作者:admin | 分类:微擎 | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • 零点城市社交电商v1.6.2 not support:redis

    小程序提示:友情提示 not support:redis 报错,是因为php扩展没有加redis支持插件 安装redis 缓存器即可   阅读全文
    作者:admin | 分类:微擎 | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • Thinkphp截取标题长度加省略号

    第一步 公共文件common.php创建msubstr方法,最新下新增: /** *+---------------------------------------------------------- * 字符串截取,支持中文和其他编码 *+---------------------------------------------------------- * @static * @access public *+---------------------------------------------------------- * @param string $str 需要转换的字符串 * @param string $lengt...阅读全文
    作者:admin | 分类:cltphp | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • php统计IP PV和今日访问量

    php统计IP方法: php引用,在wordpress主题中 $getroot=$_SERVER['DOCUMENT_ROOT']; require_once("$getroot/countstart.php"); function getIpAddress() { // 取得当前用户的IP地址 $ip = '127.0.0.1'; if(isset($_SERVER)){ if(isset($_SERVER["HTTP_X_FORWARDED_FOR"])){ $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; }else if(isset($_SERVER["HTTP...阅读全文
    作者:admin | 分类:PHP | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • tp5 文件上传方法

    thinkphp5 文件上传方法,代码如下: 建立/application/index/controller/Index.php <?php namespace app\index\controller; use think\Controller; use think\Request; class Index extends Controller { public function index() { return $this->fetch(); } public function upload(){ // 获取表单上传文件 例如上传了001.jpg $file = request()->file('image'); // 移动到框架...阅读全文
    作者:admin | 分类:Thinkphp | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • TP5助手函数与3.2版本的单字母函数对比

    我们一直用ThinkPHP 3.2 觉得单字母函数非常方便,但在TP5就废除了,名字为助手函数,主要考虑兼容性,不会造成滥用情况。下在是对照表,对于初学者很有必要。 5.0助手函数 助手函数 描述 abort 中断执行并发送HTTP状态码 action 调用控制器类的操作 cache 缓存管理 config 获取和设置配置参数 controller 实例化控制器 cookie Cookie管理 db 实例化数据库类 debug 调...阅读全文
    作者:admin | 分类:Thinkphp | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • php输出echo、print、print_r、printf、sprintf、var_dump的区别比较

    一、echo echo() 实际上不是一个函数,是php语句,因此您无需对其使用括号。不过,如果您希望向 echo() 传递一个以上的参数,那么使用括号会发生解析错误。而且echo是返回void的,并不返回值,所以不能使用它来赋值。 例子: 代码如下: <?php $a = echo("55nav"); // 错误!不能用来赋值 echo "55nav"; // 55nav echo ("55nav"); // 55nav echo ("55nav","com"); //发生错误,有括号不...阅读全文
    作者:admin | 分类:Thinkphp | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • PHP 301重定向

      <?php header("HTTP/1.1 301 Moved Permanently");//说明返回的是301 header("Location:http://www.wmphp.com");//重定向后的网址 ?> <meta http-equiv="refresh" content="0;url=http://blog.wmphp.com/" /> //HTML直接转向 阅读全文
    作者:admin | 分类:PHP | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |
  • php编程 会员号和密码

    会员号12位,前6位为100508,后6位生成不含4的随机数;密码16位数字,生成1000个不重复的。 <?php //会员号不含4 function getRandStr($length) { $str = '012356789'; $randString = ''; $len = strlen($str)-1; for($i = 0;$i < $length;$i ++){ $num = mt_rand(0, $len); $randString .= $str[$num]; } return $randString ; } $chang='100508'; //password function getpwd($len...阅读全文
    作者:admin | 分类:PHP | 阅读:
    Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line 19
    |