Ben bir dize without işlenen olarak file_get_contents ve çıkış php kod çalışılıyor. Fikri bir textarea düzenlenebilir böylece ham un render dosya içeriğini kapmak için ...
// file "foo.php" I'm needing the contents of
<h1>foo</h1>
<? include 'path/to/another/file' ?>
// php file that's calling the file_get_contents
<?php
echo file_get_contents('foo.php');
?>
Yukarıdaki kod php dışarı stripping çıktılar foo.php dahil:
<h1>foo</h1>
Herkes çıkışı olacak çiğ un render dize olarak içeriğini foo.php nasıl alabilirim biliyor mu?:
<h1>foo</h1>
<? include 'path/to/another/file' ?>
Herhangi bir yardım büyük beğeni topluyor!