-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
59 lines (40 loc) · 1.15 KB
/
Copy pathtest.php
File metadata and controls
59 lines (40 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
//error_reporting(E_ALL);
//echo "Hallo?!?";
//asdf();
//echo "Hallo?!?";
//ignore_user_abort(true);
//echo ignore_user_abort();
// echo phpinfo();
// $d = dir('D:/nutzerordner/personal/amzv');
/*
while( $entry = $d->read() ) {
if ( ($entry == ".") || ($entry == "..") ) continue;
$enc = mb_detect_encoding($entry);
echo $enc;
if ($enc == 'ASCII') echo iconv("UTF-8", "UTF-16", $entry);
echo "<br>\n";
if( is_dir($entry) ) {
;
}
}
*/
$retval = array();
$code = 0;
// exec('dir /x /n D:\\nutzerordner\\personal\\amzv >D:\\nutzerordner\\personal\\amzv\\dir.txt', $retval, $code);
// echo implode("<br>\n", $retval);
// print_r($retval);
//$stream = stream_context_create();
// stream_encoding($stream, 'CP1250');
$fName = 'D:/nutzerordner/personal/amzv/泰国劳动保护法概况.docx';
$fName = iconv('utf-8', 'utf-16', $fName);
$s = file_get_contents($fName); //,0 ,$stream);
echo $s;
// echo mb_detect_encoding(file_get_contents('D:\\nutzerordner\\personal\\amzv\\dir.txt'));
// echo "<br>\n";
// $s = iconv('CP1250', 'UTF-8', $s);
// echo html_encode($s);
function html_encode($var) {
return htmlentities($var, ENT_QUOTES, 'UTF-8') ;
}
?>