Reputation: 613
I want to export my database using the PHP script I found here.
When I run the PHP script, a sql
is created, but the sql
is empty.
Besides, it also show this error in the browser :
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\test\Export.php on line 12
There was a warning during the export of testing to ~/database/test1.sql
The line 12 is this line :
exec($command,$output=array(),$worked);
Besides, I changed the output path from the example,
$mysqlExportPath ='database/test1.sql';
How to solve this error? Or any others examples?
Upvotes: 0
Views: 134
Reputation: 30488
The problem is you are assigning a blank array in this line
exec($command,$output=array(),$worked);
So just put a variable inside this command.
$output=array();
exec($command,$output,$worked);
Upvotes: 1