 
			
				11/04/2009, 08:52
			
			
			     |  
      |    |    |    Fecha de Ingreso: abril-2009  
						Mensajes: 29
					  Antigüedad: 16 años, 6 meses Puntos: 0     |        |  
  |      Respuesta: Configurar Smarty        Bueno, ya no me da error el archivo de prueba, pero ahora estoy siguiendo el tutorial de la pagina de: Smarty y no mefunciona.   
tengo este codigo:   
index.php   
<?php   
/** 
 * Project: Guestbook Sample Smarty Application 
 * Author: Monte Ohrt <monte [AT] ohrt [DOT] com> 
 * Date: March 14th, 2005 
 * File: index.php 
 * Version: 1.0 
 */   
// define our application directory 
define('GUESTBOOK_DIR', '/guestbook/'); 
// define smarty lib directory 
define('SMARTY_DIR', 'C:\smarty\libs'); 
require(SMARTY_DIR . '\Smarty.class.php');  
// include the setup script 
include(GUESTBOOK_DIR . 'libs/guestbook_setup.php');   
// create guestbook object 
$guestbook =&new Guestbook;   
// set the current action 
$_action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';   
switch($_action) { 
    case 'add': 
        // adding a guestbook entry 
        $guestbook->displayForm(); 
        break; 
    case 'submit': 
        // submitting a guestbook entry 
		$guestbook->mungeFormData($_POST); 
        if($guestbook->isValidForm($_POST)) { 
            $guestbook->addEntry($_POST); 
            $guestbook->displayBook($guestbook->getEntries()); 
        } else { 
            $guestbook->displayForm($_POST); 
        } 
        break; 
    case 'view': 
    default: 
        // viewing the guestbook 
        $guestbook->displayBook($guestbook->getEntries());         
        break;    
}   
?>     
y me da error:    
PHP Warning: include(/guestbook/libs/guestbook_setup.php) [function.include]: failed to open stream: No such file or directory in C:\inetpub\wwwroot\Guestbook\index.php on line 17 PHP Warning: include() [function.include]: Failed opening '/guestbook/libs/guestbook_setup.php' for inclusion (include_path='.:c;\smarty\libs') in C:\inetpub\wwwroot\Guestbook\index.php on line 17 PHP Fatal error: Class 'Guestbook' not found in C:\inetpub\wwwroot\Guestbook\index.php on line 20      
----------------------------------------   
la revise en el archivo :guestbook_setup.php y no se donde esta el error.   
PHP Notice: Use of undefined constant GUESTBOOK_DIR - assumed 'GUESTBOOK_DIR' in C:\inetpub\wwwroot\Guestbook\libs\guestbook_setup.  php on line 11 PHP Warning: require(GUESTBOOK_DIRlibs/sql.lib.php) [function.require]: failed to open stream: No such file or directory in C:\inetpub\wwwroot\Guestbook\libs\guestbook_setup.  php on line 11 PHP Fatal error: require() [function.require]: Failed opening required 'GUESTBOOK_DIRlibs/sql.lib.php' (include_path='.:c;\smarty\libs') in C:\inetpub\wwwroot\Guestbook\libs\guestbook_setup.  php on line 11    
no se, si alguno de ustedes me pueden indicar donde esta el error...           |