1
지금이 코드가 있습니다. content_config.php 파일 PHP에서 출력 변수를 바꾸기
<?php
error_reporting(E_ALL);
require_once('content_config.php');
function callback($buffer)
{
// replace all the apples with oranges
foreach ($config as $key => $value)
{
$buffer = str_replace($key, $value, $buffer);
}
return $buffer;
}
ob_start("callback");
?>
some content
<?php
ob_end_flush();
?>
는 :
$config['SiteName'] = 'MySiteName';
$config['SiteAuthor'] = 'thatGuy';
내가 뭘 원하는 내가 자리를 대체 할 것입니다 자사의 값으로 설정 배열의 키. 지금
, 그것은. 가
그래, 범위에 대해 생각해 보았습니다. –