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

Parse error: syntax error, unexpected '.'

 
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: Italian
View previous topic :: View next topic  
Author Message
gabpe
Smarty Rookie


Joined: 06 Aug 2008
Posts: 5

PostPosted: Fri Aug 08, 2008 6:47 am    Post subject: Parse error: syntax error, unexpected '.' Reply with quote

Ciao a tutti,

sto provando a far funzionare Smarty per la prima volta e ho un grosso problema che non mi fa andare avanti da una settimana. Ho scritto anche sul forum in inglese, ma senza successo. Aiuto!

Ho seguito la guida quasi alla lettera:
nealla cartella root del sito
- ho creato una directory library, con dentro smarty
- ho creato una cartella data con dentro le cartelle: smarty_cache, smarty_templates_c
- ho creato una cartella template, con dentro un file index.ptl

in index.tpl ho scritto:
Hello, {$name}!

infine ho creato il file index.php nella root del sito e dentro ho scritto:
<?php
//header ("Location: application/bootstrap.php");
// load Smarty library
define('SMARTY_DIR', 'application/Smarty/');
require_once(SMARTY_DIR . 'Smarty.class.php');

$smarty = new Smarty;

$smarty->template_dir = '/templates';
$smarty->config_dir = 'data/Smarty/config';
$smarty->cache_dir = 'data/smarty_cache';
$smarty->compile_dir = 'data/application/smarty_templates_c';

$smarty->assign('name','fish boy!');


?>
Rispetto alla guida, ho riscontrato che l'unico modo di trovare il file Smarty.class.php, devo utilizzare una path senza / (quindi relativa alla root).

Cosė, se lancio il browser non vedo nulla.

Se aggiungo al codice sopra $smarty->display('index.tpl');

mi ritorna questo errore: Parse error: syntax error, unexpected '.' in D:\inetpub\phproot\Web20\application\Smarty\Smarty_Compiler.class.php on line 465

č una settimana che ci sbatto la testa ho fatto milioni di prove, ma ritorno sempre all'errore di cui sopra.

Aiuto!

Grazie in anticipo.
Gabriele
Back to top
View user's profile Send private message
gabpe
Smarty Rookie


Joined: 06 Aug 2008
Posts: 5

PostPosted: Fri Aug 08, 2008 11:12 am    Post subject: Reply with quote

Risolto, ho aggiornato Smarty all'ultima versione, ora funziona!
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: Italian 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