2012-11-15 86 views
0

我使用WordPress主题滑块,在这个我使用piecemaker。谁能帮我吗?如何解决这些警告?

Warning: include() [function.include]: URL file-access is disabled in the server configuration in ..wp-content\themes\TheProfessional\page-full.php on line 8

Warning: include(http://localhost/caterer/wp-content/plugins/theme-slider/wp-theme-slider.php) [function.include]: failed to open stream: no suitable wrapper could be found in ..wp-content\themes\TheProfessional\page-full.php on line 8

Warning: include() [function.include]: Failed opening 'http://../wp-content/plugins/theme-slider/wp-theme-slider.php' for inclusion (include_path='.;Drive:\xampp\php\pear\') in ..\wp-content\themes\TheProfessional\page-full.php on line 8

+2

您是否阅读过这些警告?他们提供了一个文件和一行看,除了错误的描述 –

+0

是的,我读了它,现在它显示解析错误后,我给了路径 –

+0

解析错误:解析错误\ wp-content \ themes \ theProfessional \ page - 第18行的sitemap.php –

回答

0

你的指令allow_url_include是关闭的,如果你可以控制自己的托管则需要在php.ini配置来开启这项功能,并重新启动Apache,如果你没有你的主机的直接访问,你可以在WordPress的根目录下的index.php文件的顶部使用这段代码来打开它。

ini_set(‘allow_url_fopen’,'ON’); 

如果实在不行的概述 - 这里是一个更详细的博客文章: additional information

0

这是因为包括使用URL文件(HTTP://)这是错误背后的原因。您必须使用文件的目录路径而不是URL路径来包含文件。由于文件来自某个插件和主题,因此将您的代码更改为此

include(bloginfo('template_directory').'/page-full.php'); 
include (WP_PLUGIN_DIR.'/theme-slider/wp-theme-slider.php');