Export PostgreSQL database with php -


hello i'm trying export specific postgresql database using php laravel 5.

i thinking in using exec , pg_dump this

$command = 'pg_dump -u ' . env('db_username') . ' -h ' .env('db_host') . ' -p ' . env('db_port') . ' -f ' . $file . ' -d ' . env('db_database'); exec($command); 

but fails because i'm not able de write password when asked... there way make dump of postgresql database using exec?. or there uis better way php?.

thanks


Comments

Popular posts from this blog

python - Alternative to referencing variable before assignment -

vb.net - How to ignore if a cell is empty nothing -

Sort a complex associative array in PHP -