Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run PHP built-in server in quiet mode?

Tags:

php

How do I silent output of PHP built-in server?

I tried

php -S 127.0.0.1:80 -t public/ > /dev/null

but it still output

[Thu Jun 11 13:08:53 2015] 127.0.0.1:60963 [200]: /
like image 351
Petra Barus Avatar asked Jun 11 '15 06:06

Petra Barus


2 Answers

Try this:

php -q -S 127.0.0.1:80 -t public/

use -q option for Quiet-mode

like image 111
Mahdi Hasanpour Avatar answered Nov 16 '22 00:11

Mahdi Hasanpour


The character > just redirects standard output. If you want to redirect standard error and standard output you can use >&

php -S 127.0.0.1:80 -t public/ >& /dev/null
like image 9
c4pone Avatar answered Nov 16 '22 01:11

c4pone