Html encoding

Hello community,
i faced an issue in the last module of encoding, the third video “HTML encoding” whenever i run
pyton3 -m http.server 80 and create a file.php containing htmlspecialchars() to test XSS input via the URL, the server does not process the PHP code. Instead, when I click on file.php, it gets downloaded instead of being executed. However, .html files are rendering correctly when accessed.
what could be causing this issue guys ?

and thanks

Hi ibrahim,
I think you could use php instead of python module to setup webserver, try with this command:
php -S 127.0.0.1:80 -t .

1 Like

thanks it works ! also we can just run apache2 server and try to execute the php file from there :smiley: