downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

dir> <chdir
[edit] Last updated: Sat, 07 Jan 2012

view this page in

chroot

(PHP 4 >= 4.0.5, PHP 5)

chroot루트 디렉토리 변경

설명

bool chroot ( string $directory )

현재 프로세스의 루트 디렉토리를 directory로 변경합니다.

이 함수는 시스템이 지원하고, CLI, CGI, Embed SAPI를 사용할 때만 사용할 수 있습니다. 또한, 이 함수는 루트 권한이 필요합니다.

인수

directory

새 디렉토리

반환값

성공할 경우 TRUE를, 실패할 경우 FALSE를 반환합니다.

주의

Note: 이 함수는 윈도우 플랫폼에서는 작동하지 않습니다.



add a note add a note User Contributed Notes chroot
nmmm at nmmm dot nu 20-Nov-2011 10:05
on my system this function is missing (Linux, php-cli), so I did:

if ( function_exists("chroot") ){
       chroot($chroot);
       server_log("chroot() to $chroot", 1);
}else{
       server_log("Can not chroot(). Will try live without it.");
}

 
show source | credits | stats | sitemap | contact | advertising | mirror sites