[PHP-users 11052] Re: インタラクティブモード

Youichi Iwakiri php-users@php.gr.jp
2002年10月23日 15:00:25 +0900


いわきりです
HAYAKAWA Hiroshi wrote in <B9DC634E.14BB7%hayakawa@sam.hi-ho.ne.jp> :
>つい最近、PHPにもインタラクティブモードがあることを知りました。
>$ php -a
>インタラクティブモードでも、
>-qオプションを合わせて指定していないと
>HTTPヘッダが出力されますし、
>X-Powered-By: PHP/4.1.2
>Content-type: text/html
>>また、
>><?php ... ?>
>>というようにPHPのタグを入力する必要もありますよね。

cli版では、'-q'オプションがデフォルトです。(*1)
タグの入力は省略出来ないようです。ただし、one-linerで
書く場合は省略出来ます。(*2)
下記にcli版の特長を転記しておきます。
The main differences between the two:
* CLI is started up in quiet mode by default. (*1)
 (-q switch kept for compatibility)
* It does not change the working directory to that of the script.
 (-C switch kept for compatibility)
rrespective* Plain text error message
* $argc and $argv registered irrespective of register_globals
 and register_argc_argv php.ini settings.
* implicit_flush always on
* -r option which allows execution of PHP code directly from
 the command line (e.g. php -r 'echo md5("test");' ) (*2)
* max_execution_time is set to unlimited, overriding php.ini setting.
-- 
Youichi Iwakiri

AltStyle によって変換されたページ (->オリジナル) /