Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/01/2008, 20:05
Hats
 
Fecha de Ingreso: diciembre-2004
Mensajes: 418
Antigüedad: 19 años, 4 meses
Puntos: 2
Exclamación Problema, en configuracion de Smarty

Holas, recien toy viendo loq es Smarty, y encontre este tutorial:

http://www.codewalkers.com/c/a/Misce...r-Beginners/1/

Pero no me funciona.

mi archivo index.php:

<?php
# filename: index.php
require_once ("./libs.inc.php");
$smarty->display ("index.html");
?>


mi archivo libs.inc.php

<?php
# Filename: libs.inc.php

# the exact path is defined.
$fixpath = dirname(__FILE__);

# changes this value according to your uploaded smarty distribution.
# don't forget to add trailing back slash
# change 'username' to your username on web hosting account
define ("SMARTY_DIR", "http://localhost/smarty/");

require_once (SMARTY_DIR."Smarty.class.php");
$smarty = new Smarty;
$smarty->compile_dir = "$fixpath/compile";
$smarty->template_dir = "$fixpath/html";
?>


ubicados en la carpeta smartyrules, segun el tutorial

la carpeta smarty ( libs ), esta en la raiz de mi sevidor local ( locahost).

cuando ejecuto http://localhost/smartyrules

me imprime el contenido del index.php, pero asi como esta, me imprime defrente el codigo como si no fuera un archivo php, como si fuera solo texto simple.

hice algo mal en las instrucciones del tutorial?, o el tutorial esta imcompleto o no bien hecho?, por favor, me es urgente arreglar este problema, les agradezco de antemano.