路径都没有错,内容也会显示,但是显示的是源码

解决方案 »

  1.   

    用的apache ? php 的解析模块没有加载正确
      

  2.   

    你的php没有解释哦。
    看看是不是apache没有安装php
      

  3.   

    竟然没有安装PHP模拟环境
    建议安装 apmserv 或 wamp
      

  4.   

    没有问题呀$url = 'http://121.40.216.219';
    print_r(get_headers($url));
    Array
    (
        [0] => HTTP/1.1 200 OK
        [1] => Cache-Control: private
        [2] => Pragma: no-cache
        [3] => Content-Type: text/html; charset=utf-8
        [4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
        [5] => Vary: Accept-Encoding
        [6] => Server: Microsoft-IIS/8.5
        [7] => Set-Cookie: PHPSESSID=t9fhf4vdolsrbvipik4rg0pv77; path=/
        [8] => X-Powered-By: ThinkPHP
        [9] => Date: Mon, 11 May 2015 07:14:43 GMT
        [10] => Connection: close
        [11] => Content-Length: 29319
    )
    echo file_get_contents("$url/install/index.php");<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title> 小猪PigCms微信营销平台V7.8加盟版 安装程序</title>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    ......
    可能他自己弄好了吧另外请楼上的朋友们注意了:如果没有配置 php 运行环境的话,访问时是文件下载,而不是源码
      

  5.   

    php没有被解析,看一下是不是<?php前面有东西