[Q] Windows 命令列 是否有類似 Linux 的 grep ?
* findstr
* 安裝GnuWin32 或者 Cygwin 或者 Mingw
C:\> netstat -n | findstr 3389
C:\> dir | findstr php.ini
C:\> php -i |findstr error_log
[Q] php cli mode (php 的命令列模式) 如何設定 記錄檔 (log file)?
$ php -i | grep error_log
修改php.ini 中 error_log 的值, 確認該路徑可寫入
$ php -c /etc/php5/cli/php.ini -r " error_log('test 123'); "
$ tail /var/log/php_errors.log
[Q] How to set error log for PHP CLI?
* chk the error_log location
* make sure php cli is run with enough permission to write to error_log file
//===
php -v
php --ini
php -i
php -h
php -r "echo 'run echo cmd'; "
php -c myphp.conf //use myphp.conf as php.ini ???
php -c mydir //look for php.ini under mydir
[ref]
http://stackoverflow.com/questions/1416241/is-there-a-pattern-matching-utility-like-grep-in-windows
http://stackoverflow.com/questions/6387542/php-cli-wont-log-errors
沒有留言:
張貼留言