第一次问问题啊,有点紧张,嘿嘿。
关于PHP路径的问题,先贴出主要用的目录和文件:
test(网站总目录)
+admin
┖textadd.php
┖textaddok.php
+conn
┖conn.php
+templates
┖top.html
┖text.html
+html
┖text.html
text.php
top.php
大致就这些,现在的问题是(用的是smarty模板):
text.php是用来写入的templates目录下的text.html模板文件的,top.php是用来写入templates目录下的top.html文件的。然后html文件夹下的text.html文件是text.php生成后的静态网页。
admin文件夹下的textadd.php的文章上传的网页,textaddok.php是接受过来处理的网页,现在textaddok.php要调用根目录下的text.php文件来生成网页,但是text.php调用了top.php,也调用了conn.php,还调用了smarty模板配置文件。然后就出错了。
错误提示是:
Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'top.html'' in C:\wwwroot\Smarty\libs\sysplugins\smarty_internal_template.php:163 Stack trace: #0 C:\wwwroot\Smarty\libs\sysplugins\smarty_internal_template.php(541): Smarty_Internal_Template->isExisting(true) #1 C:\wwwroot\Smarty\libs\Smarty.class.php(337): Smarty_Internal_Template->getRenderedTemplate() #2 C:\wwwroot\Smarty\libs\Smarty.class.php(381): Smarty->fetch('top.html', NULL, NULL, NULL, true) #3 C:\wwwroot\test\top.php(27): Smarty->display('top.html') #4 C:\wwwroot\test\text.php(5): include_once('C:\wwwroot\test...') #5 C:\wwwroot\test\admin\textgo.php(64): include_once('C:\wwwroot\test...') #6 {main} thrown in C:\wwwroot\Smarty\libs\sysplugins\smarty_internal_template.php on line 163
我看的都迷糊了,求助啊,哪位好心的大神帮帮忙啊,项目要开发完了,现在碰到这问题了,悲催啊。
关于PHP路径的问题,先贴出主要用的目录和文件:
test(网站总目录)
+admin
┖textadd.php
┖textaddok.php
+conn
┖conn.php
+templates
┖top.html
┖text.html
+html
┖text.html
text.php
top.php
大致就这些,现在的问题是(用的是smarty模板):
text.php是用来写入的templates目录下的text.html模板文件的,top.php是用来写入templates目录下的top.html文件的。然后html文件夹下的text.html文件是text.php生成后的静态网页。
admin文件夹下的textadd.php的文章上传的网页,textaddok.php是接受过来处理的网页,现在textaddok.php要调用根目录下的text.php文件来生成网页,但是text.php调用了top.php,也调用了conn.php,还调用了smarty模板配置文件。然后就出错了。
错误提示是:
Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'top.html'' in C:\wwwroot\Smarty\libs\sysplugins\smarty_internal_template.php:163 Stack trace: #0 C:\wwwroot\Smarty\libs\sysplugins\smarty_internal_template.php(541): Smarty_Internal_Template->isExisting(true) #1 C:\wwwroot\Smarty\libs\Smarty.class.php(337): Smarty_Internal_Template->getRenderedTemplate() #2 C:\wwwroot\Smarty\libs\Smarty.class.php(381): Smarty->fetch('top.html', NULL, NULL, NULL, true) #3 C:\wwwroot\test\top.php(27): Smarty->display('top.html') #4 C:\wwwroot\test\text.php(5): include_once('C:\wwwroot\test...') #5 C:\wwwroot\test\admin\textgo.php(64): include_once('C:\wwwroot\test...') #6 {main} thrown in C:\wwwroot\Smarty\libs\sysplugins\smarty_internal_template.php on line 163
我看的都迷糊了,求助啊,哪位好心的大神帮帮忙啊,项目要开发完了,现在碰到这问题了,悲催啊。
解决方案 »
- php调用mysql的存储过程失败!不返回结果!那个大侠能够帮助下,不胜感激啊!
- 一个排列组合算法问题 抛砖引玉一下
- www.xx.com/test_file/xx1.php能访问,却找不到test_file这个文件怎么回事?
- PHP语法表
- 急:安装Zend Optimizer,在选择C:\Inetpub之后点NEXT就没有反应了,怎么解啊?
- php超简单问题__set和__get的问题
- 为什么ini_set("session.gc_maxlifetime",48*3600)不管用呢??????????
- 谁对搜索一个数据库中多表的数据分页有研究呢?请指教下,希望给出了详细的例子
- 帮我看看一下的程序错在哪里,谢谢!
- 请教一下php文件之间怎样传值?
- 数据统计问题
- 单引号比双引号快吗?
不管哪个php文件,
都chdir到test这个目录,
然后用统一的路径包含文件