note 89066 deleted from function.system by danbrown

From: Date: Tue, 03 Mar 2009 16:05:50 +0000
Subject: note 89066 deleted from function.system by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151401@lists.php.net to get a copy of this message
Note Submitter: tyagi dot akhil at gmail dot com ---- While using mysqldump or any other mysql query, use chdir to change the directory so that command can be executed. This will not work (Using XAMPP on ubuntu) system ( "./mysqldump -q -X -h localhost -u user_name -psome_pass db_name >/opt/lampp/htdocs/your_directory/tmp/db_name.xml",$error); But this will work chdir('/opt/lampp/bin'); system ( "./mysqldump -q -X -h localhost -u user_name -psome_pass db_name >/opt/lampp/htdocs/your_directory/tmp/db_name.xml",$error); Thanks

« previous php.notes (#151401) next »