Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

instalacion de smarty en windows

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish
View previous topic :: View next topic  
Author Message
nlandero
Smarty n00b


Joined: 18 Feb 2009
Posts: 2

PostPosted: Fri Feb 20, 2009 9:48 pm    Post subject: instalacion de smarty en windows Reply with quote

estoy usando el zend como editor de php, tengo un acceso ftp donde trabajo mi proyecto, copie la libreria de smarty a mi proyecto, ya cree las carpetas templates, templates_c, configs y cache.

el problema que tengo es el siguiente:
cuando lo ejecuto me pone el siguiente error:
Warning: Smarty error: unable to read resource: "index.tpl" in smarty/Smarty.class.php on line 1095
les pongo el codigo del index:
Code:

<?php
require('smarty/Smarty.class.php');
$miSmarty=new Smarty();
$miSmarty->template_dir='modulos/templates';
$miSmarty->config_dir = 'modulos/config';
$miSmarty->cache_dir = 'modulos/cache';
$miSmarty->compile_dir = 'modulos/templates_c';
$miSmarty->assign("titulo", "Formulario");
$miSmarty->display('index.tpl');
?>

el codigo del tpl es:
Code:

<html>
<head>
   <title>Prueba Smarty</title>
</head>
   <body>
       <p>{$texto}</p>
   </body>
</html>

******************************************
por favor ayudenme soy nuevo en esto.


Last edited by nlandero on Wed May 05, 2010 11:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
JoelG
Smarty n00b


Joined: 24 Feb 2009
Posts: 1

PostPosted: Tue Feb 24, 2009 3:29 pm    Post subject: Reply with quote

el problema es de la ruta, que servidor web tienes instalado? easyphp, appserver o lo instalaste manualmente?

cuando utilizo windows, siempre pongo el archivo Smarty.class.php en toda la raiz.

mira, yo tengo un archivo donde defino todos los parametros, y despues simplemente llamo ese archivo, asi

Code:

<?
require('Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = 'templates/';
$smarty->compile_dir = 'templates_c/';
$smarty->config_dir = 'configs/';
$smarty->cache_dir = 'cache/';
?>


y en los archivos php llamo a ese archivo

require('config-smarty.php');
Back to top
View user's profile Send private message
nlandero
Smarty n00b


Joined: 18 Feb 2009
Posts: 2

PostPosted: Tue Feb 24, 2009 4:26 pm    Post subject: Reply with quote

ya lo intete y no funciona, el con respecto a tu pregunta del servidor, estoy de pasante en una empresa donde lo unico que me dieron es un acceso ftp para trabajar mis proyectos, al cual solo tengo tengo acceso desde zend. De todos modos muchas gracias.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP