Built-in PHP server serving only .php files

I created a dir named "test", and inside this directory I created 3 files: 1.jpg, 2.html and 3.php. If I run php -S localhost:80and try to visit localhost / 3.php, it will work. But if I visit 1.jpg or 1.html or any file that is not php, it gives me 404 not found error. I am using PHP 7.1 NTS in Windows 10. I tried with PHP TS and PHP 7.2, but the error persists.

enter image description here

+4
source share
1 answer

The problem may be caused by the accent e in your file path, please check it elsewhere. Why the embedded PHP web server does not serve a file named é.txt (on Windows)

+3
source

Source: https://habr.com/ru/post/1690159/


All Articles