Ben dahil bir HTML dosyası içinde yer PHP değişkenler var. Bu yürütme en iyi yolu nedir?
//contents of file1.php
$variable1 = "text 1";
$variable2 = "text 2"
$newContent = include('file2.php');
echo $newContent;
//contents of file2.php
<p>standard HTML with PHP... <strong><?=$variable1?></strong></p>
<p><?=$variable2?></p>
Bu genel bir yöntem Tamam kabul ama burada gerçek kod çalışmaz. I () file_get_contents () kullanın veya dahil etme, nasıl çıktı, doğru içeriği için içeren dosya içinde PHP idam mı?
Ben gibi bir şey kullanıyor olmalıdır HTML>>>