Heim  >  Artikel  >  Backend-Entwicklung  >  当html被smarty的display调用时,显示全是乱的,

当html被smarty的display调用时,显示全是乱的,

WBOY
WBOYOriginal
2016-06-23 13:22:56786Durchsuche

当html被smarty的display调用时,显示全是乱的,
并且html单独打开时正常,
admin.php调用html.两者没有在同一目录,
当html post的时候发现自身的目录变成了admin.php的目录,从而显示接受post的文件不存在,


回复讨论(解决方案)

因为你的admin_login.html 是编码,所以出现了乱码。

至于提交时出现了404应该是你的form的action的路径没写对。

因为你的admin_login.html 是gbk编码,所以出现了乱码。

你需要检查和修改一个表单的action,贴出你的代码看看

1、你没有告知是什么样的乱码
2、#2 的截图中 url 显然是多了一级 admin
3、没有看到 smarty 要求的工作目录的设定
4、模板文件为何不在 smarty 要求的工作目录中?

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:php?AjaxNächster Artikel:js里写php代码