zblog的 $this->lang['msg']['operation_failed'],lang到底都配置什么?在哪里查看?都有哪些值?zblog语言包

zblog2年前zblog问题解答42

在上一篇文章《zblog函数ShowHint('good')中good是怎么来的?允许哪些,不允许哪些?》源码中有一个 

$content = $this->lang['msg']['operation_failed']; 

$content = $this->lang['msg']['operation_succeed'];

image.png

问题就来了,lang到底都配置什么?在哪里查看?zblog的 $this->lang['msg']['operation_failed'],lang到底都配置什么?在哪里查看?都有哪些值?


class ZBlogPHP 初始化 函数是 Initialize() Initialize()调用了 LoadLanguage() 函数,会载入指定的语言包 ,这里就是 \zb_users\language\zh-cn.php 文件

image.png


根据函数,也可能是其他文件。 看  \zb_users\language\zh-cn.php 文件


image.png


搜索  

$content = $this->lang['msg']['operation_succeed'];

中的operation_succeed


image.png

看到了吧。


还有一个简单的办法,程序遍历:

image.png

<?php 

require '../../../zb_system/function/c_system_base.php';

require '../../../zb_system/function/c_system_admin.php';

$zbp->Load();

foreach($zbp->lang['msg'] as $key=>$val){

$zbp->ShowHint('tips',$key ."= " . $val,1000);

}

运行结果如:

image.png

搜索 operation_succeed 也能看到值。

image.png

相关文章

(zb表名字)zblog获取系统表的名字 $zbp->table[$tableNameShort]

直接复制把! $zbp->table['Post'] # 文章/页面 输出: zbp_post  (字符串类型) $z...

ucs-4 这是啥编码 mb_convert_encoding($content, 'ucs-4', 'utf-8') 啥意思

UCS-4 是一种Unicode字符编码形式,全称为 Universal Character Set - 4 bytes。它是Unicode标准的一种实现,其中每个字符都使用4个字...

zblog常用简写

print_r($zbp->currenturl); # 当前url 路径 访问 www.zblog.cn/post/123.html 就是 ...

ai提示词 生成文章tag 标签

ai提示词 生成文章tag 标签

你是一个专业的文章标签生成专家, 并符合SEO优化要求。 要求: 理解给定内容是属于哪一个行业,并且思考这个篇内容是在解决用户的什么问题 从正文中提取出最多5个最合适的标签,并返回...

Call to undefined function xnxf()zblog提示“可能的错误原因提示或500网络错误”时排查错误的方法

Call to undefined function xnxf()zblog提示“可能的错误原因提示或500网络错误”时排查错误的方法

很多时候都有可能遇到《错误提示》这类的提示,产生这个错误的原因一般来说都是服务端报错,如下图准备工作:1、进入后台,在网站设置的全局设置里,打开调试模式。2、如果不能进后台,那就用ftp连进网站,编辑...

宝塔面板去掉https使用宝塔http

宝塔面板去掉https使用宝塔http

rm -rf /www/server/panel/data/ssl.pl && bt 1/etc/init.d/bt restartbt 14---------------------...