나는 [루트]이 코드 /includes/helpdesk/pipe.php 있습니다파이프 스크립트에서 상대 경로 (../)를 갖는 방법은 무엇입니까?
#!/opt/cpanel/ea-php55/root/usr/bin/php
<?php
require_once("pipeprocess.php");
같은 위치에서 첫 번째 줄에 pipeprocess.php에서 나는 같은 위치에 또 다른 파일을 포함 : helpdesk.php를 첫번째 라인 [루트] 다음에 /includes/helpdesk/helpdesk.php
제가 가지고
require_once ("../../config.php");
config.php 파일은 [루트]이고, I는 두이 이유이다 .. /../, helpdesk.php는 direc에서 잘 작동합니다. t 액세스하지만, cPanel에서 파이프 명령 설정을 통해 pipe.php를 실행하면 반송 오류가 발생합니다. PHP는 찾을 수 없습니다 :
PHP Warning: require_once(../../config.php): failed to open stream: No such file or directory in /home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on line 21
Warning: require_once(../../config.php): failed to open stream: No such file or directory in /home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on line 21 PHP Fatal error: require_once(): Failed opening required '../../config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on line 21
Fatal error: require_once(): Failed opening required '../../config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on line 21
왜 내가 helpdesk.php에 대한 직접 액세스 권한이 제대로 작동합니까? 파이프가 ../ 또는 ../../ 경로의 일부로 받아 들여지지 않습니까? 또는 EasyApache4 문제가 있습니까? 몇 가지 테스트를 수행하고 이것이 경로 포함 경로의 일부로 발견되었습니다. pipe/EasyApache4에 문제가 있습니까?
감사 :
PHP 5.3.0, 다음과 같이 사용할 수 있습니다. 일했다. –