Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $user = "Иван";
- $world = "Земля";
- $tpl = file_get_contents('shab.tpl');
- $result = $tpl;
- $result = strtr($result, array(
- "{user}" => $user,
- "{world}" => $world,
- ));
- echo $result;
- ?>
- теперь файл shab.tpl
- <html>
- <head>
- <title>Шаблонизатор от romagaisin</title>
- </head>
- <body>
- Привет {user}! Мы живём на планете {world}ю
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement