PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Datin into MySQL
Beitrag
<blockquote data-quote="ItsNeko" data-source="post: 807486" data-attributes="member: 197999"><p><strong>AW: Datin into MySQL</strong></p><p></p><p>Hey ich bins nochmal sry für den doppelpost aber ich wollte kein neues thema öffnen.</p><p>ich habe früher anstelle von mysql meine daten in textseiten gespeichert, hat eigentlich auch ganz gut geklappt, aber textseiten sind ja nicht die zukunft <img src="/styles/default/xenforo/smilies/zwinker.gif" class="smilie" loading="lazy" alt=";)" title="Wink ;)" data-shortname=";)" /></p><p></p><p>ich habe mir damals ein script schreiben lassen das die daten aus der textseite liest und ausgibt. da ich jetzt mit mysql arbeite würde ich das gerne umschreiben, allerdings versteh ich nur bahnhof wenn ich mir das script anschaue.</p><p>Könnte mir vllt jemand das script erklären?</p><p></p><p>[php]</p><p>01 echo "<table align='center' width='600px'>";</p><p>02 echo "<tr><td style='width:600px;vertical-align:top;'>";</p><p>03 echo "Browser:";</p><p>04 echo "<ul>";</p><p>05 $filepath = '../hp/stats/browser.dat';</p><p>06</p><p>07 $delimiter = ',';</p><p>08 $enclosure = "'";</p><p>09</p><p>10 $input_array = array();</p><p>11 $fHandle = @fopen( $filepath, 'r' );</p><p>12 while(false !== ($row = fgetcsv($fHandle,@filesize($filepath), $delimiter, $enclosure))){</p><p>13 if( sizeof($row) > 0 ){</p><p>14 foreach($row as $field){</p><p>15 $input_array[] = $field;</p><p>16 }</p><p>17 }</p><p>18 }</p><p>19 @fclose($fHandle);</p><p>20</p><p>21 $strTable = '<table>'.PHP_EOL;</p><p>22 foreach( array_count_values( $input_array ) as $key=>$keyCount ){</p><p>23 $strTable .= ' <tr>'.PHP_EOL;</p><p>24 $strTable .= ' <td style="text-align:left;"><li>'.$key.'</li></td><td style="text-align:left;"> '.$keyCount.'x </td><td style="text-align:left;"><img src="stats/1.PNG" width="'.($keyCount * 4).'" height="12"></td> '.PHP_EOL;</p><p>25 $strTable .= ' </tr>'.PHP_EOL;</p><p>26 }</p><p>27 $strTable .= '</table>'.PHP_EOL;</p><p>28</p><p>29 print($strTable);</p><p>30 echo "</ul></td></tr>";[/php]hier dazu noch die browser.dat</p><p>[php]'Netscape','Microsoft Internet Explorer','Netscape','Microsoft Internet Explorer','Netscape'[/php]danke schonmal im vorraus.</p></blockquote><p></p>
[QUOTE="ItsNeko, post: 807486, member: 197999"] [b]AW: Datin into MySQL[/b] Hey ich bins nochmal sry für den doppelpost aber ich wollte kein neues thema öffnen. ich habe früher anstelle von mysql meine daten in textseiten gespeichert, hat eigentlich auch ganz gut geklappt, aber textseiten sind ja nicht die zukunft ;) ich habe mir damals ein script schreiben lassen das die daten aus der textseite liest und ausgibt. da ich jetzt mit mysql arbeite würde ich das gerne umschreiben, allerdings versteh ich nur bahnhof wenn ich mir das script anschaue. Könnte mir vllt jemand das script erklären? [php] 01 echo "<table align='center' width='600px'>"; 02 echo "<tr><td style='width:600px;vertical-align:top;'>"; 03 echo "Browser:"; 04 echo "<ul>"; 05 $filepath = '../hp/stats/browser.dat'; 06 07 $delimiter = ','; 08 $enclosure = "'"; 09 10 $input_array = array(); 11 $fHandle = @fopen( $filepath, 'r' ); 12 while(false !== ($row = fgetcsv($fHandle,@filesize($filepath), $delimiter, $enclosure))){ 13 if( sizeof($row) > 0 ){ 14 foreach($row as $field){ 15 $input_array[] = $field; 16 } 17 } 18 } 19 @fclose($fHandle); 20 21 $strTable = '<table>'.PHP_EOL; 22 foreach( array_count_values( $input_array ) as $key=>$keyCount ){ 23 $strTable .= ' <tr>'.PHP_EOL; 24 $strTable .= ' <td style="text-align:left;"><li>'.$key.'</li></td><td style="text-align:left;"> '.$keyCount.'x </td><td style="text-align:left;"><img src="stats/1.PNG" width="'.($keyCount * 4).'" height="12"></td> '.PHP_EOL; 25 $strTable .= ' </tr>'.PHP_EOL; 26 } 27 $strTable .= '</table>'.PHP_EOL; 28 29 print($strTable); 30 echo "</ul></td></tr>";[/php]hier dazu noch die browser.dat [php]'Netscape','Microsoft Internet Explorer','Netscape','Microsoft Internet Explorer','Netscape'[/php]danke schonmal im vorraus. [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 5, ▼ = 2 und ■ = 7, was ist ▲ × ▼ + ■?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Datin into MySQL
Oben