Answer the question
In order to leave comments, you need to log in
How to solve encoding problem in php?
Hello! All commands and operations work as they should. But the execution operation does not work as I want.
Here is the code:
<?php
$a = `dir c:`;
print "<pre>" . $a . "</pre>";
?>
��� � ���ன�⢥ C �� ����� ��⪨.
���� ����� ⮬�: 2E4C-FF6A
����ন��� ����� C:\OpenServer\domains\comet
17-02-2018 16:28
.
17-02-2018 16:28
..
22-02-2018 15:48 340 js.html
22-02-2018 20:55 60 php.php
2 䠩��� 400 ����
2 ����� 39�821�983�744 ���� �����
Answer the question
In order to leave comments, you need to log in
Windows uses cp1251 encoding.
OpenServer is set to utf8 by default.
Hence the output
Either convert the output of the execution statement to utf-8.
Or reconfigure the server.
The first is preferable, the
second if you plan to run the script only on your own.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question