2012-08-08 2 views
0

PHP가 포함되어 있습니다. 내 서버의 경로는 [root]/Edge-animations/splash/publish/web/splash.php입니다. 처음 시도했을 때 경로가 잘못되었다는 오류가 나타났습니다. 전체 서버 경로 (/homepages/3/d426847376/htdocs/Edge-animations/splash/publish/web/splash.php 행을 따라)를 넣어야한다는 것이 밝혀졌습니다. 링크를 수정 한 후 내 페이지를 다시로드하려고 시도했습니다. 오류를 표시하지는 않지만 포함시키려는 파일을 표시하지 않았습니다.PHP가 포함되지 않습니다.

<?php include('/homepages/3/d426847376/htdocs/Edge-animations/splash/publish/web/splash.php'); ?> 

를 내가 작업 PHP에 사용되는 구문이 다른 페이지에 포함 일치 다음과 같이 내 PHP 구문입니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까?



편집
포함 된 파일이 에지에 의해 출력되는 HTML 파일입니다; 확장자를 .html에서 .php로 변경했습니다. 코드는 다음과 같습니다.

<!DOCTYPE html> 

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<title>Untitled</title> 
<!--Adobe Edge Runtime--> 
<meta http-equiv="X-UA-Compatible" content="chrome=IE8"> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/chrome-   frame/1/CFInstall.min.js"></script> 
    <script type="text/javascript" charset="utf-8" src="splash-v1_edgePreload.js"> </script> 
    <style> 
    .edgeLoad-Splash { display:none; } 
</style> 
<!--Adobe Edge Runtime End--> 

</head> 
<body style="margin:0;padding:0;"> 
<div id="Stage" class="Splash"> 
</div> 
</body> 
</html> 

또한 링크에 괄호와 세미콜론을 추가했습니다. 여전히 작동하지 않습니다.

+0

splash.php 출력을 무엇? –

+0

'error_reporting'의 어떤 레벨을 설정 했습니까? –

+0

포함 된 파일에 문제가있을 수 있습니다. 오류를 숨기기 위해 error_settings를 변경하여 스크립트를 중단시킬 수 있습니다. 이 포함 된 파일의 코드를 보여주십시오. –

답변

0

테스트 목적으로 시도 단지에 대한

<?php 
$path = '/homepages/3/..........'; 
ini_set('display_errors', true); 
error_reporting(E_ALL); 

echo 'path=',$path, "<br />\n"; 
if (!file_exists($path)) { 
    die('no such file'); 
} 
else { 
    //include $path; 
    echo '<p>opening file</p>'; 
    $fp = fopen($path, 'rb'); 
    if (!$fp) { 
     die('open failed'); 
    } 
    echo '<p>reading file</p>'; 
    $content = stream_get_contents($fp); 
    if (false===$content) { 
     die('read failed'); 
    } 
    echo '<p>strlen(content)=',strlen($content), '<p>'; 
} 
관련 문제