so siehts bei mir auf dem lokalen server aus
http://wuselmensch.ch/images/local.png
und so auf meiner website
http://wuselmensch.ch/images/online.png
und auch das txt file wird im editor nicht gleich angezeigt
Beiträge von Agaetí Blödhren
-
-
Hallo,
als mir mal ein nachmittag langweilig war(solls ja mal geben), hab ich mir n php script für mich erstellt um Gitarren Noten darzustellen. An dem script hab ich immer weiter gesbastelt, wodurch es auch zu diesem furchtbaren aussehen gekommen ist.
mein Problem ist allerdings, dass das script nur auf meiner lokalen XAMPP maschine funzt.. und auf meinem webspace nicht
ich habe folgenden code:
index.phpPHP
Alles anzeigen<?php include("pwd/pwd.php"); include("function/ip.php"); $note = $_POST['note']; include("function/dump_note.php"); $fp = fopen('txtfiles/song'.get_ip().'.txt', "w"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Unbenanntes Dokument</title> </head> <body> <form action="<?=$_SERVER['../PHP_SELF'];?>" method="POST" target=_self> <?php $arraykey = 1; if ($note == "") { } else{ foreach($note as $val){ echo '<input type="hidden" name="note['.$arraykey.']" value="'.$val.'">'; $arraykey++; } } if($arraykey % 5 == 0 AND $arraykey != 0){ echo'<input type="hidden" name="note['.$arraykey.']" value="split">'; $arraykey++; } else { } ?> ton: <select size="1" name="note[<?php echo $arraykey; ?>]"> <?php $sql = "SELECT `name` FROM `ton` ORDER BY `name` ASC"; $result = mysql_query($sql) or die(mysql_error()); while($line = mysql_fetch_row($result)){ foreach($line as $val){ if($val != "split") { echo '<option value="'.$val.'" selected>'.$val.'</option>'; } } } ?> </select> <input type="submit" value="hinzufügen"> </form> <?php echo '[img]images/start.png[/img]'; if ($note == "") {echo '[img]images/end.png[/img]'; } else{ fwrite($fp, ' '); foreach($note as $array){ echo '[img]images/'.$array.'.png[/img]'; if($array == "split") fwrite($fp, ' '); else fwrite($fp, ' Q '); } echo '[img]images/end.png[/img]'; fwrite($fp, ' '); $saite = array(); $saite['E'] = 1; $saite['B'] = 2; $saite['G'] = 3; $saite['D'] = 4; $saite['A'] = 5; $saite['h'] = 6; foreach($saite as $key => $saite) { if($saite == 6){ fwrite($fp, 'E||'); } else{ fwrite($fp, $key.'||'); } echo dump_note($note, $fp, $saite, $array);; } } fclose($fp); $inhalt = file_get_contents('txtfiles/song'.get_ip().'.txt'); echo '<pre>'.$inhalt.'</pre>'; ?> Download file [url='download.php']song.txt[/url] V1.0 ©by Marco Glauser </p> </body> </html>
dump_note.phpCode
Alles anzeigen<? function dump_note($note, $fp, $saite, $array){ foreach($note as $key => $array){ $zahl = 's'.$saite ; $sql = "SELECT `$zahl` FROM `ton` WHERE `ton`.`name` = \"$array\""; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_assoc($result)){ while($array != 0);{ fwrite($fp, '--'.$row[$zahl].'--'); } } } fwrite($fp, '||'); fwrite($fp, ' '); } ?>
und der rest ist nicht so interessant
hab ich da irgendwas falsch gemacht,dass auch das textfile nur lokal lesbar ist?
ein beispiel auf
http://wuselmensch.ch/