Greetings I can't figure this one out? When I open the url http://localhost it opens the index.html and then instead of getting the site, get a save as / open with dialog box. When I have a look at what it wants to save, it the php file. How do I fix this? -- Chadley Wilson Redhat Certified Technician Cert Number: 603004708291270 Pinnacle Manufacturers of Proline Computers ==================================== Exercise freedom, Use LINUX =====================================
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Chadley Wilson wrote:
I can't figure this one out? When I open the url http://localhost it opens the index.html and then instead of getting the site, get a save as / open with dialog box. When I have a look at what it wants to save, it the php file.
How do I fix this?
If it's a PHP file, the server needs to know it should treat it like one. By default, files ending with ".html" are not parsed by the PHP interpreter, they are sent to the browser "as-is". The PHP code included in the page confuses your browser, so it fails to display it. You either need to rename the file to ".php", ".phtml" or "php3" (or some other extension that will instruct the web server to treat that page as PHP code). Alternatively, you can reconfigure your server to treat files ending on ".html" as PHP code, too. This is what I have added to my apache config: AddType application/x-httpd-php .html .php .phtml .php3 Note that sending every HTML page through PHP like that may have a performance impact on busy sites. Hope that helps. Bye, LenZ - -- - ------------------------------------------------------------------ Lenz Grimmer <lenz@grimmer.com> -o) [ICQ: 160767607 | Jabber: LenZGr@jabber.org] /\\ http://www.lenzg.org/ V_V -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCcKccSVDhKrJykfIRArv8AJwKPE9uSceCK/34DD0A+bVVD0UrTgCfUTa7 Yq1nn/SCL8muoSzH5maBsBE= =B2Vh -----END PGP SIGNATURE-----
participants (2)
-
Chadley Wilson
-
Lenz Grimmer