|
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 |
halloweb Smarty Regular
Joined: 23 Nov 2004 Posts: 35
|
Posted: Mon Nov 29, 2004 11:22 am Post subject: Fehlermeldung : Invalid argument supplied for foreach() |
|
|
Folgende Fehlermeldung wird auf der index.php ausgegeben !
Ausgabe index.php :
Code: | <b>Warning</b>: Invalid argument supplied for foreach() in <b>/srv/www/htdocs/web78/html/demo/index.php</b> on line <b>49</b><br /> |
Quell-Code-index.php :
Code: | $dateienname=array();
foreach($datei_name as $himbeere)
{
array_push($dateienname,$himbeere);
} |
Weiss einer wo der Fehler liegt ?
________
grilling steaks
Last edited by halloweb on Wed Feb 02, 2011 7:06 pm; edited 2 times in total |
|
Back to top |
|
T. Smarty Regular
Joined: 22 Aug 2004 Posts: 69 Location: AT
|
|
Back to top |
|
halloweb Smarty Regular
Joined: 23 Nov 2004 Posts: 35
|
Posted: Mon Nov 29, 2004 3:42 pm Post subject: |
|
|
Quote: | was genau willst du machen, dann kann ich dir mehr sagen |
Es wird damit ein Filename ausgegeben !
index.php:
Code: | $dateienname=array();
foreach($datei_name as $himbeere)
{
array_push($dateienname,$himbeere);
} |
index.tpl :
Code: | ...colspan=2><input type=file name=datei[]>
...colspan=2><input type=file name=datei[]>
...colspan=2><input type=file name=datei[]> |
Was das Script auch macht !
Nur bekomme ich folgende Fehlermeldung in der index.php
Code: | <b>Warning</b>: Invalid argument supplied for foreach() in <b>/srv/www/htdocs/web78/html/demo/index.php</b> on line <b>8</b><br /> |
"Invalid argument supplied for foreach()"
Wie soll ich "foreach()" ausgeben ?
Danke, die Seiten sind sehr hilfreich !
________
vapir air one
Last edited by halloweb on Wed Feb 02, 2011 7:06 pm; edited 2 times in total |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Nov 29, 2004 3:52 pm Post subject: |
|
|
$dateienname != $datei_name
(setz mal dein error-reporting auf E_ALL, dann wirs du evtl. eine E_NOTICE bekommen, dass $datei_name undefined ist) |
|
Back to top |
|
halloweb Smarty Regular
Joined: 23 Nov 2004 Posts: 35
|
|
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
|