Answer the question
In order to leave comments, you need to log in
How to solve the template rendering problem?
The bottom line is this, there is a file with settings (setup_pages.php):
<?php
require_once 'libs/Smarty.class.php';
$smarty = new Smarty();
$smarty->template_dir = 'templates';
$smarty->compile_dir = 'templates_c';
$smarty->config_dir = 'configs';
$smarty->cache_dir = 'cache';
$sql = "SELECT * FROM posts WHERE id =".$post_id;
$result = mysqli_query($connect, $sql);
$separate_post = mysqli_fetch_assoc($result);
$smarty->display('templates/post.tpl');
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question