My first way is decode the encode using :
Wiki Says : Chinese encode is
GB18030
but i need to know what is "
¶¯×÷½çÃæ£*£*¶¯×÷1" encode...
i tired with this... and i try to use php with
header('Content-Type:text/html; charset=GB18030'); function
and that is no need to know the currently encode...
so, i create Editor Sistem on PHP and this is the PHP Code :
index.php :
PHP Code:
<?php
header('Content-Type:text/html; charset=GB18030');
$sourceFolder = "file/";
$fileName = ''.$sourceFolder.''.$_GET['file'].'';
if(isset($_POST['newFile'])){
$fileNameNew = $_POST['newFile'];
$changeFile1 = fopen($fileName, "w") or die("Unable to save this file");
$changeFile = fwrite($changeFile1, $fileNameNew);
}
if(isset($_GET['file'])){
$file = fopen($fileName,"r") or die("Unable to open file!");
$fileRead = fread($file,filesize($fileName));
echo '
<a href="index.php" style="padding: 10px; background: #0093dd; color: #fff; font-weight: bold; text-decoration: none; margin: 10px; display: inline-block; font-family: arial;">View all file</a>
<div style="font-size: 14px; font-family: arial; font-weight: bold; padding: 10px; text-align: center; background: #0093dd; color: #fff; width: 480px;">'.$_GET['file'].'</div>
<form action="" method="post">
<textarea name="newFile" id="newFile" style="width: 500px; height: 400px;">'.$fileRead.' </textarea><br>
<input type="submit" value="Save">
</form>';
}else{
if (is_dir($sourceFolder)){
if ($dh = opendir($sourceFolder)){
while (($file = readdir($dh)) !== false){
if($file != ".." && $file != "."){
echo''.$file.' <a href="'.$sourceFolder.''.$file.'">View</a> or <a href="index.php?file='.$file.'">Edit</a><br>';
}
}
closedir($dh);
}
}
}
?>
And this is the file structure :
Quote:
- htdocs / www
- Chinese ( FOLDER )
- file ( FOLDER )
- index.php
|
Video :
Good luck
