Jump to content

chinese taiwan characters !!!!


patentu

Recommended Posts

i have an html file submits data to a php file which saves inputed data to a .txt but if i write chinese or taiwan characters i get " ϥΪ̥N½X¨Ï¥ÎªÌ¥N½X " instead of  " 客訴服務電話 ".

 

 

The PHP:

 

<?php
header("Content-Type: text/plain;charset=ISO-8859-1");

@$pfw_ip= $_SERVER['REMOTE_ADDR'];
@$idno = addslashes($_POST['idno']);
@$id = addslashes($_POST['id']);
@$email = addslashes($_POST['email']);



$pfw_file_name = "dates.txt";
$pfw_first_raw = "---------------------------------\r\n";
$pfw_values = "Ip: $pfw_ip  
Question: $idno; 
Refrence: $id; 
Email: $email; 
--------------------------------------------------\r\n";
$pfw_is_first_row = false;
if(!file_exists($pfw_file_name))
{
$pfw_is_first_row = true ;
}
if (!$pfw_handle = fopen($pfw_file_name, 'a+')) {
die("Cannot open file ($pfw_file_name)");
exit;
}
if ($pfw_is_first_row)
{
  if (fwrite($pfw_handle, $pfw_first_raw ) === FALSE) {
  die("Cannot write to file ($pfw_filename)");
  exit;
  }
}
if (fwrite($pfw_handle, $pfw_values) === FALSE) {
  die("Cannot write to file ($pfw_filename)");
  exit;
}
fclose($pfw_handle);

header("Location: home.htm");

?>

 

Thank you!!!!

Link to comment
https://forums.phpfreaks.com/topic/256474-chinese-taiwan-characters/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.