我最近更改了自制框架以将模板文件存储在主题文件夹中而不是常规模板文件夹中。现在的问题是,我已经这样做了,出于某种原因,我的include()指向正确的文件,但不起作用。但是,由于某些原因,主题模板包含()的作品。php包括不为现有文件工作
我收到这些错误:
Warning: require(lib/themes/original/templates/en/home/index.php): failed to open stream: No such file or directory in /home/stretch045/public_html/lib/theme/original/templateen.php on line 27
Warning: require(lib/themes/original/templates/en/home/index.php): failed to open stream: No such file or directory in /home/stretch045/public_html/lib/theme/original/templateen.php on line 27
Fatal error: require(): Failed opening required 'lib/themes/original/templates/en/home/index.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/stretch045/public_html/lib/theme/original/templateen.php on line 27
我相信最后的一个可能解释,但我不明白在括号中的东西的解释是:因为这不是我有一个路径在我的共享服务器上。
如果有必要,我会提供代码,但我不明白这可能是问题,因为路径是正确的。
路径明显不正确 – ElefantPhace
使用fullpath'/ something/lib/themes /'代替相对的'lib/themes' –