לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה ‎print ‎"Hello World!"; if‎ ‎not rules.‎know ‎then rules.‎read(); חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > תכנות ובניית אתרים
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
תגובה
 
כלי אשכול חפש באשכול זה



  #1  
ישן 30-08-2008, 15:42
  Poke Poke אינו מחובר  
 
חבר מתאריך: 11.03.07
הודעות: 6
צריך עזרה במערכת guestbook

אני לא בטוח אם הבעיה היא בphp או בפלאש אבל הנה:

יש לי אתר בפלאש שיש בו שני דברים שעובדים עם php

1- טופס "צור קשר" יש 2 שדות שממלאים ואז לוחצים על כפתור וזה שולח לאימייל שמוגדר מראש בתוך הphp

2- מערכת guestbook יש 3 שדות שממלאים

לוחצים על "שלח" זה מריץ קובץ php שבעצם שומר את הנתונים שנשלחו מהפלאש בקובץtxt

ואז הפלאש מציג את הקובץ txt

הכל עובד מצוין חוץ מהעברית

נתחיל קודם מהguestbook

מה שקורה עם העברית זה שפשוט במקום העברית לא מופיע כלום

נגיד שבשדה name הכנסתי "בדיקה"

מופיע לי name:

וזהו....

זה הקוד php



קוד PHP:
<?php 
// If you are using an old version of php, remove the next set of lines.
// or use $HTTP_POST_VARS["..."] instead.
 
$Submit = [CODE]%4$s[/CODEPOST["Submit"];
$Name = [CODE]%4$s[/CODEPOST["Name"];
$Email = [CODE]%4$s[/CODEPOST["Email"];
$Comments = [CODE]%4$s[/CODEPOST["Comments"];
$NumLow = [CODE]%4$s[/CODEREQUEST["NumLow"];
$NumHigh = [CODE]%4$s[/CODEREQUEST["NumHigh"];
 
// Replace special characters - you can remove the next 5 lines if wanted.
$Name ereg_replace("[^A-Za-z0-9 ]"""$Name);
$Email ereg_replace("[^A-Za-z0-9 \@\.\-\/\']"""$Email);
$Comments ereg_replace("[^A-Za-z0-9 \@\.\-\/\']"""$Comments);
 
// Remove slashes.
$Name stripslashes($Name);
$Email stripslashes($Email);
$Comments stripslashes($Comments);
 
// ##################################################  ########## #######################
// ########## Reading and Writing the new data to the GuestBook Database #############
 
if ($Submit == "Yes") {
// Next line tells the script which Text file to open.
$filename "GuestBook.txt";
 
// Opens up the file declared above for reading 
 
$fp fopen$filename,"r"); 
$OldData fread($fp80000); 
fclose$fp ); 
 
// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
 
// Puts the recently added data into html format that can be read into the Flash Movie.
// You can change this up and add additional html formating to this area. For a complete listing of all html tags
// you can use in flash - visit: [url]http://www.macromedia.com/support/flash/ts/documents/htmltex[/url] t.htm
 
$Input "name: <b>$Name</b><br>email: <b><u><a href=\" mailto:$Email\">$Email</a></u></b><b r><b>$Comments</b><br><i><font size=\"-1\">date: $Today</font><br><br>.:::.";
 
/* 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 */
 
$New "$Input$OldData";
 
// Opens and writes the file.
 
$fp fopen$filename,"w"); 
if(!
$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp$New800000); 
fclose$fp ); 
}
 
// ##################################################  ########## #######################
// ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##
 
 
 
// Next line tells the script which Text file to open.
$filename "GuestBook.txt";
 
// Opens up the file declared above for reading 
 
$fp fopen$filename,"r"); 
$Data fread($fp800000); 
fclose$fp );
 
// Splits the Old data into an array anytime it finds the pattern .:::.
$DataArray split (".:::."$Data);
 
// Counts the Number of entries in the GuestBook
$NumEntries count($DataArray) - 1;
 
print 
"&TotalEntries=$NumEntries&NumLow=$NumLow&NumHig h=$NumHigh&GuestBook=";
for (
$n $NumLow$n $NumHigh$n++) {
print 
$DataArray[$n];
if (!
$DataArray[$n]) {
Print 
"<br><br><b>No More entries</b>";
exit;
}
}
?>



אני צריך שהקוד יתמוך בעברית וגם יציג הכל בעברית לדוגמא:

שם:בדיקה

דוא"ל:בדיקה

הערות:בדיקה

כשניסיתי לשנות רק את התצוגה לעברית הפלאש לא הסכים לטען את הtxt בכלל

באנגלית הכל עובד מצוין

נערך לאחרונה ע"י Poke בתאריך 30-08-2008 בשעה 15:45.
תגובה ללא ציטוט תגובה עם ציטוט חזרה לפורום
תגובה

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 05:09

הדף נוצר ב 0.05 שניות עם 12 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2024 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר