Site saves index.php file rather than opening it into localserver WAMP
I have a开发者_Go百科 website on a WAMP server. When I launch the website´s folder, it tries to save the index.php file rather than displaying the generated page in the web browser. What can I do about this?
It is solved. the .htaccess file was creating problem, I deleted that file from the folder , now it is working perfect. Thank you all for helping
I think there is no this line: AddType application/x-httpd-php-source .php
in your httpd.conf (uncommented).
Second possible problem: wrong content of doc_root
variable in php.ini.
Edit.
Last possible problem with Apache or PHP is this line:
LoadModule php5_module modules/libphp5.so
It should be in httpd.conf. In modules
directory there should be libphp5.so
file, too.
IMHO if it's not one of these problem it's problem with WAMP, not Apache nor PHP. If so, sorry but I can't help you.
You haven't enabled .htaccess file and when you access the site then it doesn't redirect request to index.php. Rename .htaccess.sample to .htaccess and issue will resolve.
are you open your website from http://localhost/ ?
if this is not your problem,it is php server definition problem. reinstall wamp, it may be fix.
You have to call the page from your browser, e.g. http://localhost/index.php
. Opening it in the browser from your filesystem just opens it as text.
精彩评论