Avatar ·

PHP code not executing, displayed as text in browser

Hi everyone! I'm a beginner in PHP and encountered a strange problem. I wrote a simple script, but when I open the file through the browser, instead of the execution result I see the code itself. Here's my code (file test.php): ```php ``` I saved this file in the folder C:\xampp\htdocs\test\. When I go to the browser at http://localhost/test/test.php, the page just shows: ``` ``` So PHP is not being processed, it's being output as plain text. Meanwhile, HTML code works fine — if I write `

Header

`, it displays correctly. XAMPP is installed, Apache is running, PHP seems to be installed. What am I doing wrong? Do I need to configure something additionally? I tried reinstalling XAMPP, but the problem persists.