|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
gerard Smarty Regular
Joined: 18 Apr 2003 Posts: 84
|
Posted: Wed Jan 28, 2004 9:57 am Post subject: $smarty.files ? |
|
|
How come $_FILES isn't available as $smarty.files ? |
|
Back to top |
|
gerard Smarty Regular
Joined: 18 Apr 2003 Posts: 84
|
Posted: Wed Jan 28, 2004 7:56 pm Post subject: |
|
|
.
? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jan 28, 2004 8:37 pm Post subject: |
|
|
maybe just because file-uploads don't have to do much with display-logic? |
|
Back to top |
|
gerard Smarty Regular
Joined: 18 Apr 2003 Posts: 84
|
Posted: Wed Jan 28, 2004 9:10 pm Post subject: |
|
|
It's still useful info. I think it should be included. If you have file upload templates (like I do), it's nice to have easy access to info about uploaded files - size, type, name. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jan 28, 2004 9:49 pm Post subject: |
|
|
why not just assign it then? |
|
Back to top |
|
gerard Smarty Regular
Joined: 18 Apr 2003 Posts: 84
|
Posted: Thu Jan 29, 2004 6:23 am Post subject: |
|
|
Yeah, why not? Anyhow I tried doing:
$smarty->files =& $_FILES;
But this causes an error:
{$smarty.files.upload.name} |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Jan 29, 2004 9:09 am Post subject: |
|
|
"$smarty->assign_by_ref('files', $_FILES)" and "{$files}" |
|
Back to top |
|
|
|
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
|