why php function in some location, but not other ??

Posted February 3, 2014 6.7k views
Hi mates, Look I have some serious issue in here. when I go to a folder that contain index.php, the full php code shows up plain instead of being hidden since it is the php property to hide whatever inside it. for example, when I go to any of my domain folder like this the code shows up as a plain code while it is supposed to be hidden... or it should search for index.php or index.html..., but it doesn't. However, when I go to the same folder and I write this way it works and only this way, which is high risk since a hacker can see my php content and break into my site easily... anyone knows how to fix this issue?? Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
8 answers
is your code between the php tags?
What webserver are you using?
@kamal, I'm using Debian 7 64x
@baggio0o, The codes are well-designed with php coding. any php file doesn't work, not only my own code work of php...
did you install php?
yes, sure I did. I installed php-fpm
Debian is an operating system. What webserver are you using? nginx?