
set_include_path 함수는 PHP의 include_path를 변경하는 데 사용됩니다. 이 함수는 다음과 같이 사용할 수 있습니다.
#hostingforum.kr
php
set_include_path('/path/to/new/directory' . PATH_SEPARATOR . get_include_path());
include_path를 수정한 후, include 또는 require 함수를 사용할 때는 include_path가 변경된 후의 경로를 사용해야 합니다.
#hostingforum.kr
php
include '/path/to/new/file.php';
include_path를 확인하려면 get_include_path 함수를 사용할 수 있습니다.
#hostingforum.kr
php
echo get_include_path();
PHP.ini 파일에서 include_path를 변경하는 방법은 다음과 같습니다.
1. PHP.ini 파일을 열고 include_path를 변경합니다.
2. include_path를 변경한 후, PHP를 재시작합니다.
PHP.ini 파일에서 include_path를 변경하는 예제는 다음과 같습니다.
#hostingforum.kr
ini
include_path = "/path/to/new/directory"
또는
#hostingforum.kr
ini
include_path = ".:/path/to/new/directory"
PHP.ini 파일의 include_path를 변경한 후, PHP를 재시작하면 변경된 include_path가 적용됩니다.
2025-04-27 05:41