Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP] Ksiega gosci (maly problem)
Forum PHP.pl > Forum > Przedszkole
Lepikur
Witam, zrobilem księge gosci na stronie flash, jednak mam problem z wyświetlaniem polskich znaków. Użyłem poniższego kodu:
  1. <?php
  2. ##### Original PHP Script by Jeffrey Hill of http://www.Flash-DB.com
  3. ##### Modifications doqs (to work with sprites in SWiSH)
  4. ##### Contact : doqs@wp.pl
  5. // If you are using an old version of php, remove the next set of lines.
  6. // or use $HTTP_POST_VARS["..."] instead.
  7. $Submit = $_POST["Submit"];
  8. $Name = $_POST["Name"];
  9. $Comments = $_POST["Comments"];
  10. $NumLow = $_REQUEST["NumLow"];
  11. $NumHigh = $_REQUEST["NumHigh"];
  12.  
  13. // Replace special characters - you can remove the next 5 lines if wanted.
  14. $Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);
  15. $Comments = ereg_replace("[^A-Za-z0-9 \@\.\/\']", "", $Comments);
  16. // Remove slashes.
  17. $Name = stripslashes($Name);
  18. $Comments = stripslashes($Comments);
  19.  
  20. // ################################################################################
    ###
  21. // ########## Reading and Writing the new data to the GuestBook Database #############
  22.  
  23. if ($Submit == "Yes") {
  24. // Next line tells the script which Text file to open.
  25. $filename = "GuestBook.txt";
  26.  
  27. // Opens up the file declared above for reading
  28.  
  29. $fp = fopen( $filename,"r");
  30. $OldData = fread($fp, 80000);
  31. fclose( $fp );
  32.  
  33. // Gets the current Date of when the entry was submitted
  34. $Today = (date ("l dS of F Y"));
  35.  
  36. // Puts the recently added data into html format that can be read into the Flash Movie.
  37. // You can change this up and add additional html formating to this area. For a complete listing of all html tags
  38. // you can use in flash - visit: www.macromedia.com/support/flash/ts/documents/htmltext.htm
  39.  
  40. $Input = "Name: <b>$Name</b>
  41. Comments: <b>$Comments</b><br>
  42. <i><font size=\"-1\">Date: $Today</font>
  43.  
  44. .:::.";
  45.  
  46. /* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file */
  47.  
  48. $New = "$Input$OldData";
  49.  
  50. // Opens and writes the file.
  51.  
  52. $fp = fopen( $filename,"w");
  53. fwrite($fp, $New, 800000);
  54. fclose( $fp );
  55. echo '&load=loaded&';
  56. }
  57.  
  58. // ################################################################################
    ###
  59. // ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##
  60.  
  61.  
  62.  
  63. // Next line tells the script which Text file to open.
  64. $filename = "GuestBook.txt";
  65.  
  66. // Opens up the file declared above for reading
  67.  
  68. $fp = fopen( $filename,"r");
  69. $Data = fread($fp, 800000);
  70. fclose( $fp );
  71.  
  72. // Splits the Old data into an array anytime it finds the pattern .:::.
  73. $DataArray = split (".:::.", $Data);
  74.  
  75. // Counts the Number of entries in the GuestBook
  76. $NumEntries = count($DataArray) - 1;
  77.  
  78. print "&load=loaded&&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook=";
  79. for ($n = $NumLow; $n < $NumHigh; $n++) {
  80. print $DataArray[$n];
  81. if (!$DataArray[$n]) {
  82. Print "<br><br><br><b>No More entries</b>";
  83.  
  84. }
  85. }
  86. ##### Original PHP Script by Jeffrey Hill of http://www.Flash-DB.com
  87. ##### Modifications by www.Swish-Tutorials.com (to work with sprites in SWiSH)
  88. ##### Contact : Brian Ayers at admin@swish-tutorials.com
  89. ?>


W czym moze być problem? ...bo juz nie mam zadnych pomysłow. Dzieki za pomoc
gigzorr
brak typu dokumenty jak nie includujesz to musisz dac.
Lepikur
Nie do końca rozumiem? Tzn? [jestem początkujący]
LesLilk
250 Mg Amoxicillin Capsule For Dogs Discount Tab Doryx On Line Akron generic levitra online pharmacy Cialis Generico Serve La Ricetta Compare Viagra Prices Walmart

Cialis 10 Bestellen Amoxicillin Dosage Tooth Infection buy roche accutane online uk dove acquistare levitra sicuro Cialis Pas Cher Nantes

Vente Kamagra En Ligne viagra 20mg Levitra Levitra Comprar Online

Propecia Precio What Std'S Are Treated With Cephalexin generic cialis from india Cialis En Barcelona Black Market Estrogen
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.