Author |
|
spser
Joined: 29 Aug 2016 Posts: 97
|
Posted: Fri 01 Feb '19 5:36 Post subject: php.html |
|
|
假如文件命名为 a.php.html 并且是gbk编码.
就会乱码.
apache 2.4.38
php 7.3.1
请求帮助.
Mod Edit
Quote: |
Suppose the file is named a.php.html and is gbk encoded.
It will be garbled.
Apache 2.4.38
Php 7.3.1
Ask for help. |
/Mod Edit |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 01 Feb '19 9:48 Post subject: |
|
|
Why not using UTF-8? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 01 Feb '19 9:56 Post subject: |
|
|
I tried and it works for me. Do you parse .html files?
|
|
Back to top |
|
spser
Joined: 29 Aug 2016 Posts: 97
|
Posted: Fri 01 Feb '19 10:17 Post subject: |
|
|
a.php.html
Code: | test
<?php
phpinfo();
?>
|
竟然运行成功了, 显示了phpinfo信息.. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 01 Feb '19 16:13 Post subject: |
|
|
what do you see if you look into the generated code in your browser? (screenshot would be nice) |
|
Back to top |
|
spser
Joined: 29 Aug 2016 Posts: 97
|
Posted: Sat 09 Feb '19 15:24 Post subject: |
|
|
<IfModule mime_module>
TypesConfig "conf/mime.types"
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddType text/html .php .phps .phpc .cgi
AddHandler cgi-script .cgi .pl .asp
AddHandler application/x-httpd-php .php
AddOutputFilter INCLUDES .shtml
</IfModule>
a.php.html
<?php
phpinfo();
?>
竟然运行成功了, 显示了phpinfo信息..
错误配置应该是来自:
AddHandler application/x-httpd-php .php |
|
Back to top |
|