linux - Web Browsers Refusing to Render PHP Code -
i'm running on linux backtrack5 r3 via vmware on windows 7.
on linux os have apache2, php5 , mysql14 installed. when make simple test.php file , try opening firefox 14.0.1, tries download file. not result after since have file :/
after searching around , finding no answers, decided install opera , try opening test.php on opera 12.14 linux i386. though didn't ask me download file, still didn't give me result wanted. didn't render php @ all, displayed plain text if viewing source code in notepad.
for example, have file text.php containing <?php echo '<p>hello world</p>'; ?>
.
- upon opening file in firefox, says "do wish save or open file test.php?"
- upon opening file in opera, instead of displaying "hello world", displays "
<?php echo '<p>hello world</p>'; ?>
".
am doing wrong?
browsers don't execute php files, servers do. server delivering php file instead of executing it. should returning file text/html i'd bet it's being delivered php no browser knows with.
in comment accessing file directly instead of going through server. means php file never executed server. must put in directory on server can interpret php , serve browsers.
Comments
Post a Comment