nginx的conf配置中,在 location ~ .php$ 区块中加入:

fastcgi_param  PHP_VALUE "open_basedir=$document_root:/tmp/:/proc/";