Hallo!
Ich habe folgende Datei erstellt, jedoch wird die CSV-Datei nicht erstellt! kann mir da jemand helfen?
	
							
						
					Ich habe folgende Datei erstellt, jedoch wird die CSV-Datei nicht erstellt! kann mir da jemand helfen?
PHP Code:
	
	
$dir=dirname($_SERVER['SCRIPT_FILENAME'])."/files/temp/";
$uid=$_GET['id'];
$offer="SELECT * FROM tx_touristik_park WHERE flyer='$uid'";
$result_offer = mysql_query($offer);
while($row = mysql_fetch_object($result_offer))
    {
        $headline=$row->headlinelong;
        $codes="SELECT bookcode FROM tx_touristik_offers WHERE uid='$row->offer'";
        $result_codes = mysql_query($codes);
        while($row2 = mysql_fetch_object($result_codes))
            {
                $edvcode=$row2->bookcode;
                
                for($i = 0, $Export = ""; $i < mysql_num_rows($result_codes); $i++)
                {
                $Spalte[] = str_replace("\"", "\"\"", $edvcode);
                $Spalte[] = str_replace("\"", "\"\"", $headline);
                for($j = 0; $j < count($Spalte); $j++)
                {
                $Export .= "\"" . $Spalte[$j] . "\"";
                if($j != count($Spalte)-1)
                {
                $Export .= ";";
                }
                }
                $Export .= "\r\n";
                $Spalte = "";
                }
                
            }
    }
    $Datei = $dir."EDV-Liste ".$uid.".csv"; // Es wird eine Datei mit Datum ind Zeit erstellt
    $FilePointer = fopen($Datei, "w");
    fwrite($FilePointer, $Export);
    fclose($FilePointer); 
 
          
 Moderatorin
 Moderatorin

Comment