phpcms V9在添加和编辑文章生成html后,模版里面不输出username值的解决方法! -云主机博士

phpcms V9在添加和编辑文章生成html后,模版里面不输出username值的解决方法! -云主机博士 第1张

在内容模板里加上{ParseError: KaTeX parse error: Expected 'EOF', got '}' at position 9: username}̲,编辑内容或添加内容时生成的页…username字段值,批量生成时有。

1.phpcms\modules\content\templates\content_add.tpl.php
找到代码:

<form name="myform" id="myform" action="?m=content&c=content&a=add" method="post" enctype="multipart/form-data">

以下的代码添加在上面这段代码的后面,添加的位置,大概在90-93行之间;

添加在下面的代码上面,方便阅读:

<input type="hidden" name="info[username]" value="<?php echo $admin_username?>" />

添加后变成:

<input type="hidden" name="info[username]" value="<?php echo $admin_username?>" /><div class="button"><input value="<?php echo L('save_close');?>" type="submit" name="dosubmit" class="cu" style="width:145px;" onclick="refersh_window()"></div>

2.phpcms\modules\content\templates\content_edit.tpl.php
找到代码:

<form name="myform" id="myform" action="?m=content&c=content&a=edit" method="post" enctype="multipart/form-data">

以下的代码添加在上面这段代码的后面,添加的位置,大概在90-93行之间;

添加在下面的代码上面,方便阅读:

<input value="<?php echo $data['username']?>" type="hidden" name="info[username]" />

添加后变成这样:

<input value="<?php echo data['username']?>" type="hidden" name="info[username]" />
<input value="<?php if(data[′username′]?>"type="hidden"name="info[username]"/><inputvalue="<?phpif(r['upgrade']) echo $r['url'];?>" type="hidden" name="upgrade">

宝塔服务器面板,一键全能部署及管理,送你3188元礼包,点我领取


iproyal.png
原文链接:,转发请注明来源!
「phpcms V9在添加和编辑文章生成html后,模版里面不输出username值的解决方法! -云主机博士」评论列表

发表评论