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

search for in the

설정 파일 이행> <이전 버전과 호환되지 않는 변경점
Last updated: Fri, 24 Jul 2009

view this page in

CLI와 CGI

PHP 5에서 CLI와 CGI 파일명이 변경되었습니다. PHP 5에서, CGI 버전은 php-cgi.exe로 변경되었고 (이전에는 php.exe) CLI 버전이 주 디렉토리에 위치합니다. (이전에는 cli/php.exe)

PHP 5에서, 새로운 모드가 존재합니다: php-win.exe. 이는 CLI 버전과 동일하지만, php-win은 아무것도 출력하지 않으며, 그렇기에 콘솔을 생성하지 않습니다. ("도스창"이 화면에 나타나지 않습니다) 이는 php-gtk와 비슷합니다.

PHP 5에서 CLI 버전은 어떠한 php.ini 지시어 설정과 관계 없이 항상 전역의 $argv$argc 변수를 가집니다. 심지어 register_argc_argvoff로 설정해도 CLI에는 영향이 없습니다.

명령줄 레퍼런스를 참고하십시오.



add a note add a note User Contributed Notes
CLI와 CGI
shoebappa at gmail dot com
13-Mar-2008 05:41
I pulled my hair out for 10 hours trying to figure out why my CGI Wrappers would spit out the shell script and not run the code.

From: http://ubuntuforums.org/showthread.php?t=341164&highlight=apache+php

"PHP4 needs a specific configuration so that it won't try to execute the starter script.
Edit /etc/php4/cgi/php.ini, search for cgi.fix_pathinfo and set it to 1.

If you don't do this, PHP5 will work fine (it has cgi.fix_pathinfo compiled right in), but PHP4 will simply output the starter script. (You can even put <?php phpinfo (); ?> inside the starter script and will see the PHP information.)"

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