Hi, ich habe ein kleines Problem mit str_replace...
Inahlt der index.php :
<?PHP include("login/include.php"); ?>
{LOGINBOX}
Inhalt der include.php :
Soweit ich die str_replace funtion verstehe, müsste nun das {LOGINBOX} in der index.php durch den Inahlt von templates/login_box.tpl ersetzt werden... also, durch die loginbox ausgetauscht werden. Dies funktioniert aber leider nicht.
Inahlt der index.php :
<?PHP include("login/include.php"); ?>
{LOGINBOX}
Inhalt der include.php :
PHP-Code:
<?PHP
$root = "login/";
$loginbox_template = file_get_contents($root."templates/login_box.tpl");
$self=$PHP_SELF;
$ausgabe = str_replace("{LOGINBOX}",$loginbox_template,$self);
?>

Kommentar