我使用的是WPAlchemy,它是一个创建metabox的助手类。我正试图通过我的functions.php把它包括进去,但是当我的WP_Debug设置为真时,我会发现一些奇怪的错误。
出于某种原因,Wordpress在url中包含了很多不应该包含的东西,这是我得到的警告。
Warning: include_once(/customers/d/d/4/mydomain.com/httpd.www/nysida/wp-content/themes/aaa/WPAlchemy/MetaBox.php): failed to open stream: No such file or directory in /customers/d/d/4/mydomain.com/httpd.www/nysida/wp-content/themes/aaa/functions.php on line 58 Warning: include_once(): Failed opening ‘/customers/d/d/4/mydomain.com/httpd.www/nysida/wp-content/themes/aaa/WPAlchemy/MetaBox.php’ for inclusion (include_path=’.:/usr/share/php’) in /customers/d/d/4/mydomain.com/httpd.www/nysida/wp-content/themes/aaa/functions.php on line 58 Notice: Use of undefined constant – assumed ‘ ’ in /customers/d/d/4/mydomain.com/httpd.www/nysida/wp-content/themes/aaa/header.php on line 53S用这个奇怪的url干什么?
发布于 2012-06-11 14:31:04
当我使用WPAlchemy时,说明让我将WPAlchemy目录直接放入wp-content文件夹,而不是主题文件夹。它看起来像是您的主题目录的包含代码点。路径中的所有其他内容都是特定于您的主机的,可能不是问题的一部分。
发布于 2012-06-11 16:07:51
我尝试了一种行之有效的解决方案。仍然不知道这个错误发生的确切原因,我确实在WPAlchemy文件夹中有了WPAlchemy类。不管怎么说,它现在似乎起作用了,我不会犯任何错误。
谢谢你的回答。
https://wordpress.stackexchange.com/questions/54838
复制相似问题