在http.conf中加入php的设置
#php5_start
phpIniDir "d:/Program Files/php"
LoadModule php5_module "d:/Program Files/php/php5apache2_2.dll"
#php5_end
再添加
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
问题解决