Hallo,

Ik heb wat foutmeldingen met een script wat ik heb draaien op mijn website. Het gaat om een occasion script met foto upload functie. Ik krijg hierbij alleen wat foutmeldingen en weet niet waar ik de fout moet zoeken. Misschien kan iemand mij even e-mailen die mij wil helpen met het oplossen hiervan..

Alvast bedankt!
Yoran
[email protected]
geef even wat code, zo kunnen we niks ;)

[edit]

<?php
ini_set("error_handling", 1);
error_reporting(E_ALL);
?> 


zet dit boven je script ;)
[/code]
Het is een forum, dus de problemen/oplossingen komen hier te staan. En foutmeldingen zijn er om te vermelden anders kunnen wij ook niks.
Dat begrijp ik maar ik het is een groot script dus ik kan wel allerlei pagina's gaan doorspitten en dan de codes hier gaan plaatsen maar lijkt me ook niet verstandig..

Het heeft een nieuw occasion toevoeg functie met aanpas mogelijkheden. Zodat er later nieuwe foto's kunnen worden toegevoegd.

Ik hoop nog steeds dat iemand mij wil helpen..
probeer uit te zoeken welk stuk van het script de error bevat en post dat dan, dan kunnen wij pas helpen
Adres: http://www.nugterenautos.nl/vscal/index.php

Wanneer ik een nieuw occasion aanmaak , dit is een form met een upload functie van een afbeelding krijg ik na het aanmaken foutmeldingen.

Form gedeelte:

	$content .= "<tr><td colspan=2>Hoofdfoto</td></tr>";
	$content .= "<tr><td colspan=2><input type=file name=\"image\"></td></tr>";


Foutmeldingen:

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 20

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 23

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 26

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 29

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 32

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 35

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 38

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/inc/getimageandtextarrays.php on line 41



inc/getimageandtextarrays.php

<?php
	// note - this must be included into a file that already has $dir set
  //make a list of images and texts
 
 $images1 = glob("$dir*.jpg",GLOB_NOSORT);
 $images2 = glob("$dir*.png",GLOB_NOSORT);
 $images3 = glob("$dir*.gif",GLOB_NOSORT);
 $images4 = glob("$dir*.JPG",GLOB_NOSORT);
 $images5 = glob("$dir*.PNG",GLOB_NOSORT);
 $images6 = glob("$dir*.GIF",GLOB_NOSORT);
 $images7 = glob("$dir*.jpeg",GLOB_NOSORT);
 $images8 = glob("$dir*.JPEG",GLOB_NOSORT);
  $images = array();
 $ac = 0;
 foreach ($images1 as $img){
	$images[$ac] = $img;
 	$ac++; }
 foreach ($images2 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images3 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images4 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images5 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images6 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images7 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images8 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 $texts = array();
 	foreach($images as $imgname){
		$textfile = strip_ext($imgname).".txt";
		$comments = "";
		if (!is_file($textfile)){
			$tfile = fopen($textfile, 'a');
			fclose($tfile);
		}
		if (filesize($textfile) != 0){
			$tfile = fopen($textfile, 'r');
			$comments .= fread( $tfile, filesize( $textfile ) );
			if (get_magic_quotes_gpc())
				$comments = stripslashes($comments);
			fclose($tfile);
		}
		$texts[$imgname] = $comments;
	}

?>
Bij het admin gedeelte kan ik een hoofdfoto selecteren. Maar als ik dan een occasion heb toegevoegd kan ik ook nog bewerken, en daar kan ik nog een aantal foto's erbij toevoegen dit wil ook niet echt werken...

hopelijk begrijpt iemand me ;)

bedankt!
edit bestaande occasion foto gallerij

	// images
	$timage = "<img src=\"showImage.php?pic=$mainimage&size=150\">";
	
	$content .= "<table class='mtable'>";
	$content .= "<tr><th class=\"reg_th\"  colspan=2>Hoofdfoto</th></tr>";
	$content .= "<form action=index.php method=post enctype=\"multipart/form-data\">";
	$content .= "<input type=hidden name=\"oldimg\" value=\"$mainimage\">";
	$content .= "<input type=hidden name=\"lid\" value=\"$lid\">";
	$content .= "<tr><td>$timage</td><td><input type=file name=\"image\"><input type=submit name=\"action\" value=\"Pas foto aan\"></td></tr></form></table>";
	
	$dir = "./listings/$lid/images/";
	include_once "./inc/getimageandtextarrays.php";
	
	$content .= "<table class='mtable'>";
	$content .= "<tr><th class=\"reg_th\" colspan=3>Gallerij foto's</th></tr>";
	$content .= "<form action=\"index.php\" method=\"post\" enctype=\"multipart/form-data\">"
	."<tr><td colspan=3>Upload nieuwe gallerij foto's<br>"
	."<input type=\"file\" name=\"image\" size=\"50\"/>"
  	."<input type=\"hidden\" name=\"action\" value=\"processimage\">"
  	."<input type=\"hidden\" name=\"ddir\" value=\"$dir\">"
  	."<input type=\"hidden\" name=\"lid\" value=\"$lid\">"
  	."<input type=\"submit\" name='subaction' value=\"Toevoegen\"/>" 
  	."</td></tr></form>";
  	$content .= "<tr><th class='sm_th'>Foto</th><th class='sm_th'>Commentaar</th><th class='sm_th'>Verwijderen</th></tr>";
    foreach ($images as $image){
    	//$timage = urlencode($image);    
    	$timage = $image;    
    	$textname = strip_ext($image).".txt";		    	
    	$content .= "<tr>\n";
      	$content .= "<td><img src=\"showImage.php?pic=$timage&size=150\"></td>\n";
      	$content .= "<form method=post action=\"index.php\">";
      	$content .= "<input type=hidden name=commentfile value=\"$textname\">";
      	$content .= "<input type=\"hidden\" name=\"lid\" value=\"$lid\">";
		$content .= "<input type=hidden name=action value=\"processimage\">";
      	$content .= "<td valign=top align=right><textarea name=comment rows=4 cols=40>".$texts[$image]."</textarea>"
			."<br><input type=submit name=subaction value=\"Pas tekst aan\"></td></form>\n";
     	$content .= "<form method=post action=\"index.php\">";
      	$content .= "<input type=hidden name=action value=\"processimage\">";
      	$content .= "<input type=\"hidden\" name=\"lid\" value=\"$lid\">";
		$content .= "<input type=hidden name=commentfile value=\"$textname\">";
      	$content .= "<input type=hidden name=imagefile value=\"$image\">";
       	$content .= "<td valign=top><input type=submit name=subaction value=\"Verwijder foto\"></td></form>\n";
		$content .= "</tr>";
    }
    $content .= "</table>";
 	makeMPage($content);


?>


Fouten op myslideshow.php en laat ook geen foto zien.

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 63

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 66

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 69

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 72

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 75

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 78

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 81

Warning: Invalid argument supplied for foreach() in /usr/home/deb12677/domains/nugterenautos.nl/public_html/vscal/myslideshow.php on line 84

Lijn 63 t/m 86 myslideshow.php

foreach ($images1 as $img){
	$images[$ac] = $img;
 	$ac++; }
 foreach ($images2 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images3 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images4 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images5 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images6 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images7 as $img){
 	$images[$ac] = $img;
 	$ac++; }
 foreach ($images8 as $img){
 	$images[$ac] = $img;
 	$ac++; }
Iemand die het probleem begrijpt?
Iemand die me kan helpen?

Niet Bumpen:

Twee of meer keer achter elkaar in een topic posten heet bumpen. Bumpen is pas na 24 uur toegestaan en kan een reden zijn voor de admins en moderators om een topic te sluiten. Gebruik indien nodig de knop om je tekst aan te passen.

SanThe.
Je foreach zal geen array() hebben als eerste parameter.

Reageren