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

Display();!!!

 
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 -> General
View previous topic :: View next topic  
Author Message
Samuel
Smarty n00b


Joined: 27 Sep 2003
Posts: 1

PostPosted: Sat Sep 27, 2003 9:14 am    Post subject: Display();!!! Reply with quote

Hi all!

I've only used Smarty for a day now. And i think Smary is very Cool.

but the first problem already came along....

My script (see below) doesn't work on the server.On my localhost i have no problem. Ok, the php parser shows no error, but the screen doesn't show me the template.The Display remains blank. I dont no, what to do now. Please help me....i'm desperate Confused

<?php


define("SMARTY_DIR","/hosting/www/abxang.palindrom.ch/php/");
require(SMARTY_DIR."Smarty.class.php");

$smarty = New Smarty();
$smarty->caching = false;

if ($submit == "senden") {

//Variabeln vergeben

$name = $thefile_name; //Name der Datei
$size = $thefile_size; //Die Grösse der Datei
$type = $thefile_type; //Mime-Typ der Datei

//Mime-Typ Abfrage
if (eregi("(jpg|gif|png|txt|htm|html)$",$name)) {
//Überprüfung der Datei Grösse
if ($size < 1000 && $size != 0) {
// Kopieren der Datei
copy($thefile,$name);

$smarty->display("file:/upload_ok.tpl");
}
else {
$smarty->display("file:/upload_faild.tpl");
}
}
else {
//Mime-Typ ist nicht zulässig
$smarty->display("file:/upload_falscher_mime_typ.tpl");
}
}
else {
//Anzeigen der Upload Template
echo "hello arschlöcher";
$smarty->display("upload.tpl");
}



?>
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sun Sep 28, 2003 12:23 am    Post subject: Reply with quote

Without looking too closely, it appears that your script assumes register_globals is on, which may not be the case on your server.

Also, do you really mean to use absolute paths for your templates? Do you not want them relative to your templates_dir? If so, you should use them like $smarty->display("upload_falscher_mime_typ.tpl");

cheers
Back to top
View user's profile Send private message
scdgro
Smarty Regular


Joined: 24 May 2003
Posts: 39
Location: Netherlands

PostPosted: Tue Sep 30, 2003 4:14 pm    Post subject: Reply with quote

I had the same problem, but with me, the permissions of the file were wrong. Apache couldn't read the file.
Back to top
View user's profile Send private message Send e-mail
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 -> General 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