Website showing PHP source

I have a server running SunOS 5.1, and I had a problem with the source of the php file display. When configuring the array, the source starts to appear after => . After the first => displays the rest of the file. Why is this happening?

Source example: index.php

<?php

$tmpVar = 'just testing';
$tmpArray = array(
    'test1' => 'rawr1',
    'test2' => 'rawr2',
    'test3' => 'rawr3'
);

echo "Testing<br/>";    

?>

This will lead to the conclusion:

'rawr1', 'test2' => 'rawr2', 'test3' => 'rawr3'); echo "Testing<br/>"; ?>
+3
source share
1 answer

The entire source is displayed, it just interprets the part before >as an HTML tag, so you do not see it. View the source code from your browser and you will see that your file was not parsed at all. In this problem, you have configured your web server incorrectly for complete PHP analysis.

+8
source

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


All Articles