|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
pauloedu Smarty Rookie
Joined: 28 Aug 2008 Posts: 6
|
|
Back to top |
|
migas Smarty Regular
Joined: 07 Apr 2004 Posts: 73 Location: Porto, Portugal
|
|
Back to top |
|
pauloedu Smarty Rookie
Joined: 28 Aug 2008 Posts: 6
|
Posted: Wed Oct 22, 2008 12:03 am Post subject: |
|
|
valeu a ajuda
Last edited by pauloedu on Wed May 05, 2010 10:45 pm; edited 1 time in total |
|
Back to top |
|
pauloedu Smarty Rookie
Joined: 28 Aug 2008 Posts: 6
|
Posted: Wed Oct 22, 2008 12:08 am Post subject: |
|
|
gostaria de uma ajuda, sou realmente novo em smarty e tenho o seguinte problema
tenho um scrip em php :
<?php
session_start();
/*****************************************/
require('includes/config.inc.php');
require('includes/class.dbconnector.php');
require('Smarty/libs/Smarty.class.php');
/*****************************************/
/* Verifica se o usuario esta logado */
if (!session_is_registered('logedUser_login')) {
$_SESSION['erro'] = 'Acesso restrito';
header("Location: index.php");
}
$db = new DbConnector(C_DB_HOSTNAME,C_DB_USERNAME,C_DB_PASSWORD,C_DB_DBNAME);
/* Otimizando as tabelas do banco de dados */
//Seleciona as tabelas
$tables = array();
$result = $db->query("SHOW TABLES");
while($rs = $db->fetchArray($result)){
if(substr($rs[0],0,4) != "chat"){
array_push($tables,$rs[0]);
}
}
$tables = implode(',',$tables);
//Otimiza as tabelas selecionadas
$result = $db->query("OPTIMIZE TABLE $tables");
$saida = '';
while($rs = $db->fetchArray($result)){
$saida .= $rs['Table'] . ': ' . $rs['Msg_text'] . '<br>';
}
/* Inicio do codigo */
$smarty = new Smarty();
$smarty->debugging = _SMARTY_DEBUG_;
$smarty->compile_check = _SMARTY_COMPILE_CHECK_;
$smarty->assign('nome',$_SESSION['logedUser_name']);
$smarty->assign('email',$_SESSION['logedUser_email']);
$smarty->display('home.htm');
?>
eu peguei o arquivo home.htm fiz alguma alterações e enviei o arquivo php e o htm via ftp e mudei o cmod porem ao rodar o php não me aparece o htm é não me dá nenhum erro, pode me ajudar por favor |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|