baby_lion Posted November 22, 2005 Share Posted November 22, 2005 I am all confused here. My code write as such; #!/usr/local/bin/php -q <?php set_time_limit(0); $DB_HOST = "localhost"; $DB_USERNAME = ""; $DB_PASSWORD = ""; $DB_NAME = "someDb"; $LOCAL_DUMP_PATH = "C:/apache/htdocs/"; $FILENAME_PREFFIX = "sqldump"; $filename = $FILENAME_PREFFIX.date("YmdHis").".sql"; $dump_cmd = "mysqldump -h$DB_HOST -u$DB_USERNAME -p$DB_PASSWORD"; if ($DB_NAME == "all" || $DB_NAME = "ALL") { $dump_cmd .= " --all-databases"; } else { $dump_cmd = " $DB_NAME"; } $dump_cmd .= " > $LOCAL_DUMP_PATH$filename"; exec($dump_cmd); echo "Data has been backed up!!!"; ?> This code certainly creates the file, but the files were blank! Please anyone xplain this to me...thanks.. btw, I'm using phpmyadmin 2.5.0.. Link to comment https://forums.phpfreaks.com/topic/2913-why-my-sqldump-returns-a-blank-file-sigh~~/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.