2012-03-22 3 views
-1

index.php를require_once를() 함수를 포함 할 수없는 기능()

<?php 
require_once('fr.php'); 
header('Location:'.abspath().directory()); 
?> 

fr.php

<?php 
require_once('functions.php'); 
?> 

functions.php

function abspath() 
{ 
return $_SERVER['DOCUMENT_ROOT']; 
} 

지금 내가 인덱스에 갈 때. PHP는, 내게이 오류를 제공합니다 : -

+2

괜찮아 보이는군요. 모든 파일이 정확하고 최신 상태인지 1000 % 확신합니까? –

+0

폴더 구조에서'fr.php'가'index.php' 옆에 있습니까? – slash197

+1

요구 사항은 문서와 관련이 있습니다. index.php와 fr.php와 같은 장소에있는 functions.php입니까? –

답변

0

안녕 내 모든 주석 사람들은 무슨 일이 있었 이유를 모르겠어요 ... 옳았하지만 난 내 XAMPP를 다시 시작할 때 나를 위해 잘 작동 :)

그래서이 100 % 정확한

인덱스입니다. PHP

<?php 
require_once('fr.php'); 
header('Location:'.abspath().directory()); 
?> 

fr.php

<?php 
require_once('functions.php'); 
?> 

functions.php

function abspath() 
{ 
return $_SERVER['DOCUMENT_ROOT']; 
} 
관련 문제