Jump to content

smarty template_dir problem


alin19

Recommended Posts

i have developed a site on my local computer: windows with xampp

all working good,

now i have bought a domain an a host and i'm trying to upload my files.

 

i've done that but when i try to enter the page from my browser only the php code is writed, the html code that my smarty should get isn't shown.

can you help me?

 

$smarty->template_dir = "../templates/";

$smarty->display('nelogat.html');

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/127750-smarty-template_dir-problem/
Share on other sites

i have uploaded all my folder! including all smarty files.

 

i mean that  i have 2 files:

 

test.php

 

and

 

test.html

 

test.php  contains:

 

echo "test";

$smarty->template_dir = "../templates/";

$smarty->display('nelogat.html');

 

test.html

contains

 

this is html file

 

 

and only apears test;

 

now i have changed permision of folder templates_c to 777 and still doesn't work,

 

i has anything to do with folder cvs?

<?php

echo "test";

include("db.php");

include("smarty/Smarty.class.php");

if (!isset($_SESSION))

{

session_start();

}

if (!isset($_SESSION['login']))

$_SESSION['login']=false;

 

 

$supraveghetor = array();

$smarty = new Smarty();

$conexiune = new db();

$conexiune->open();

include ("categorii_selectare.php");

 

 

 

 

 

$supraveghetor['login']=$_SESSION['login'];

$conexiune->close();

$smarty->assign("supraveghetor", $supraveghetor);

$smarty->template_dir = "..templates/";

$smarty->display('nelogat.html');

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.