Rub*_*ben 0 php file include
我想将php文件中的内容包含到另一个php文件中.(它在wordpress网站中) 包含或要求不起作用,因为它只包括文件,我需要内容本身. file_get_contents也无法正常工作,因为它只显示我的php代码而不执行它.
我必须使用什么功能?
Rij*_*ijk 5
我也不完全理解你的问题,但我认为这可能对你有用:
ob_start(); include('yourfile.php'); $contents = ob_get_clean();
$contents 现在将包含PHP脚本的"内容"(输出).
$contents
归档时间:
14 年,11 月 前
查看次数:
3046 次
最近记录: