douchao5864
2015-04-29 14:39
采纳率: 100%
浏览 40
已采纳

如何在WordPress php模板中包含一个PHP文件?

This is the code I have inside php tags:

include('/wp-content/custom-php/numberedSteps.php'); 

And I get this error:

Warning: include(/wp-content/custom-php/numberedSteps.php): failed to open stream:

No such file or directory in /home/user/public_html/website.com/wp-content/themes/flatsome/woocommerce/archive-product.php on line 85

Warning: include(): Failed opening '/wp-content/custom-php/numberedSteps.php' for inclusion (include_path='.:/usr/local/php56/pear') in /home/user/public_html/website.com/wp-content/themes/flatsome/woocommerce/archive-product.php on line 85

How can this error be fixed?

图片转代码服务由CSDN问答提供 功能建议

这是我在 php </ code>标签内的代码:</ p> \ ñ

 <代码>包括( '/可湿性粉剂内容/定制的PHP / numberedSteps.php');  
 </ code> </ pre> 
 
 

我收到此错误:</ p>

警告:include(/ wp-content / custom- php / numberedSteps.php):无法打开流:</ p>

/home/user/public_html/website.com/wp-content/themes/flatsome/woocommerce/中没有此类文件或目录 第85行的archive-product.php </ p>

警告:include():无法打开包含的'/wp-content/custom-php/numberedSteps.php'(include_path ='。:/ 第85行/home/user/public_html/website.com/wp-content/themes/flatsome/woocommerce/archive-product.php中的usr / local / php56 / pear')</ p> </ blockquote> \ n

如何修复此错误?</ p> </ div>

2条回答 默认 最新

相关推荐 更多相似问题