난에 상주하는 파일이 포함 :PHP는 (올바른 경로를 얻을 수 없다)
<?php include('../sidebar-left-big.php'); //left sidebar, category navigation and ads ?>
오류가 나는 얻을 :
Warning: include(../sidebar-left-big.php) [function.include]: failed to open stream: No such file or directory in /Library/WebServer/Documents/wordpress/wp-content/themes/directorypress/template_directorypress/_gallerypage.php on line 9
Warning: include() [function.include]: Failed opening '../sidebar-left-big.php' for inclusion (include_path='.:') in /Library/WebServer/Documents/wordpress/wp-content/themes/directorypress/template_directorypress/_gallerypage.php on line 9
내가 제대로 최선을 다하고있어 날 것으로 보인다.
나는 어쩌면 문제는 다른 파일에 포함 통해 그 _gallerypage.php가로드, 그래서 ../ 그 상대가 오류에 이르게 생각했다. 그러나 error는 sidebar-left-big.php의 경로가 어디에 있다고 생각하는지에 대해서는 아무 것도 말하지 않습니다.
가 올바른 경로가 무엇을 배울 수있는 방법이 있나요 변수의 BASE_PATH의 사용과 TOP_LEVEL_DIR을 확인하기 위해 다른 PHP 파일을 모두이 파일을 참조 할 수 있습니다? dirname을 사용하지 않고 고칠 수 있도록 현재 파일 경로를 어딘가에 인쇄 할 수 있습니까? –