PEAR 로딩시 기존의 include_path 설정을 덮어쓰지 않도록 변경 #1546
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
XE에 포함된 PEAR 라이브러리를 사용하기 위해
requirePear()
함수를 호출하면 기존의include_path
에 등록되어 있던 경로들을 모두 삭제하고 PEAR 로딩 경로만 덩그러니 남게 됩니다.XE 내부적으로는 대체로 절대경로를 사용하여 인클루드하기 때문에 큰 문제가 없지만, 서드파티 프로그램이나 다른 라이브러리들과 연동할 때 문제가 발생할 수 있습니다.
PHP에서
set_include_path()
함수를 사용할 때는 반드시get_include_path()
함수를 먼저 호출하여 기존의 경로 목록을 구한 후, 거기에 내가 원하는 경로를 덧붙이는 것이 정석입니다.https://php.net/set_include_path 예제 참고.