3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php require_once('constanten.php5'); require_once('functiounen.php5'); include('functions.lib.php'); include('zipextract.cls.php'); error_reporting(E_ALL); // test-ausgaab $n=0; echo($n.' '); $n++; if(isset($_POST['uploadfile'])) { $uploadfile = $_POST['uploadfile']; } if(isset($_REQUEST['action'])) { $action = $_REQUEST['action']; } // test-ausgaab echo($n.' '); $n++; ini_set('max_execution_time', 600); ini_set('max_input_time', 600); ini_set('memory_limit', 32); // test-ausgaab echo($n.' '); $n++; if( (isset($action)) && ($action == "Upload") ) { // test-ausgaab echo($n.' '); $n++; //----------------- FEHLERMELDUNGEN genéreieren falls néideg ---------------------------// if($_FILES['uploadfile']['error']!=0) { switch ($_FILES['uploadfile']['error']) { case 1: die(header('Location: http://'.$_SERVER['HTTP_HOST'].'/include/bicher_rop.php5?fehler=ZeGrouss')); break; case 2: die(header('Location: http://'.$_SERVER['HTTP_HOST'].'/include/bicher_rop.php5?fehler=ZeGrouss')); break; case 3: die(header('Location: http://'.$_SERVER['HTTP_HOST'].'/include/bicher_rop.php5?fehler=NetGanz')); break; case 4: die(header('Location: http://'.$_SERVER['HTTP_HOST'].'/include/bicher_rop.php5?fehler=KengFile')); break; case 6: die(header('Location: http://'.$_SERVER['HTTP_HOST'].'/include/bicher_rop.php5?fehler=KeenTMP')); break; case 7: die(header('Location: http://'.$_SERVER['HTTP_HOST'].'/include/bicher_rop.php5?fehler=NetSchreiwen')); break; default: die(header('Location: http://'.$_SERVER['HTTP_HOST'].'/include/bicher_rop.php5?fehler=KengAhnung')); break; } } // also iwerpreifen ech net wirklech eppes, mee bon et berouegt d'Gewessen if( (isset($_FILES['uploadfile']['name'])) && (strtolower(substr($_FILES['uploadfile']['name'],-3))!='zip') ) { die(header('Location: http://'.$_SERVER['HTTP_HOST'].'biller_rop.php5?fehler=KengZip')); } echo(' <html> <head> <title>Billercher roplueden Version 0.0</title> </head> <body> <span style="font-size:20px;">Billercher roplueden Version 0.0</span>'); echo('<form action="biller_rop.php5?action=Upload" method="post" enctype="multipart/form-data"> <p>Eng .zip -Datei mat de Billercher w.e.g.: <input type="file" name="uploadfile"></p>'); echo('<p><input type="submit" name="submit" value="Upload"></p> </form>'); $filename = "test.zip"; $uploaddir = './ul/'; $bild_dir = '../biller/bicher/'; $thumb_dir = '../biller/thumbs/'; move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploaddir . $filename); $zip=new Zipextract($uploaddir . $filename); $array_zip=$zip -> list_files(); $fehler=FALSE; echo('Biller: '.count($array_zip).'<br />'); $fehler_update=array(); foreach($array_zip as $file_ref => $bild) { echo('- '.$file_ref.'<br>'); if(strtolower(substr($bild,-3))!='jpg') { $fehler='keenJPEG'; echo('Do waar eng Datei derbäi dei keen JPEG-Bild ass:<br />'); echo($bild.'<br />'); } else { if ($file_handle = fopen($bild_dir.$bild, 'wb')) { fwrite($file_handle, $zip->extract_file($file_ref)); fclose($file_handle); } else { $fehler='net_geschriwen'; echo('Zut, ech konnt d\'Bild '.$bild.' net saven :(<br />'); } $zip -> extract_file($file_ref); $bild_source=imagecreatefromjpeg($bild_dir.$bild); $source_size=getimagesize($bild_dir.$bild); $target_divider=floor($source_size[0]/50); $target_y=floor($source_size[1]/$target_divider); $bild_target=imagecreatetruecolor(50,$target_y); imagecopyresampled($bild_target,$bild_source,0,0,0,0,50,$target_y,$source_size[0],$source_size[1]); imagejpeg($bild_target,$thumb_dir.$bild); $conn_db=verbannen(); $bild_numm=substr($bild,0,-4); $update_bild=' UPDATE bicher SET bild=1 WHERE bestell_nr=\''.$bild_numm.'\''; if(!$process_update=@mysql_query($update_bild,$conn_db)) { $fehler_update[]=$bild_numm; } } } if($fehler===FALSE) { if(!empty($fehler_update)) { echo('<br />Daat waar et, huet BAAL alles geklappt'); echo('<br />Leider konnt ech puer billercher kenger bestell_nr zouuerdnen<br />'); echo('Daat waren dei heiten:<br />'); foreach($fehler_update as $numm) { echo($numm.'<br />'); } } else { echo('<br />Daat waar et, alles geklappt, schon färdesch :-)'); } echo('<br />An elo kucke mer eis nach un weieng Billercher daat waren<br /><br />'); echo('<table>'); echo('<tr><td>Daat grousst Bild</td><td width="10"></td><td>an dei verklengert Versioun dervun</td></tr>'); foreach($array_zip as $bild) { echo('<tr><td>'.$bild.'</td></tr>'); echo('<tr><td><img src="'.$bild_dir.$bild.'"></td><td></td><td><img src="'.$thumb_dir.$bild.'"></td></tr>'); } echo('</table>'); } unset($zip); unlink($uploaddir . $filename); } else { echo(' <html> <head> <title>Billercher roplueden Version 0.0</title> </head> <body> <span style="font-size:20px;">Billercher roplueden Version 0.0</span>'); //----------------- FEHLERMELDUNGEN ---------------------------// // test-ausgaab echo($n.' '); $n++; if(isset($_REQUEST['fehler'])) { switch ($_REQUEST['fehler']) { case 'ZeGrouss': echo('<h1>D\'File ass leider ze grouss, net mei wei 10Mb w.e.g.</h1>'); break; case 'NetGanz': echo('<h1>D\'File ass net ganz ropgeluede gin</h1>'); break; case 'KengFile': echo('<h1>Et ass keng File ropgeluede gin</h1>'); break; case 'KeenTMP': echo('<h1>Ech konnt d\'File net saven(keen TMP directory), do ass mächteg eng schief gelaaf...</h1>'); break; case 'NetSchreiwen': echo('<h1>Ech konnt d\'File net saven, do ass mächteg eng schief gelaaf...</h1>'); break; case 'KengAhnung': echo('<h1>Hmm, do ass eppes schief gaang, hun awer net rausfonnt waat :(</h1>'); break; case 'KengZip': echo('<h1>Et MUSS eng .zip file sin(</h1>'); break; } } // test-ausgaab echo($n.' '); $n++; //----------------- FORMULAIRE FIIR UPLOAD ---------------------------// echo('<form action="biller_rop.php5?action=Upload" method="post" enctype="multipart/form-data"> <p>Eng .zip -Datei mat de Billercher w.e.g.: <input type="file" name="uploadfile"></p>'); echo('<p><input type="submit" name="submit" value="Upload"></p> </form>'); } echo('</body></html>'); // test-ausgaab echo($n.' '); $n++;
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected '<' in /in/IchH2 on line 2
Process exited with code 255.