PHP not interpreted, showing in view source

后端 未结 6 1971
春和景丽
春和景丽 2021-01-17 10:31

I\'m hoping that this will be a useful page for getting started running php code as well as solve the current problem I\'m having some very simple code as follows:



        
6条回答
  •  深忆病人
    2021-01-17 10:45

    Are you sure you have php installed? If it is you need to make sure that apache is associating .php files with the php handler. Look for an entry similar to the following in /etc/apache/apache.conf

     LoadModule php5_module modules/libphp5.so
    

    and

     application/x-httpd-php        php php5
    

    upon changing the file you will need to restart apache via sudo service httpd restart

提交回复
热议问题