save var_dump into text file [closed]
<?$server = "127.0.0.1";$username = "root";$password = "1";$link= connecttodb($server,$username,$password);function connecttodb($server,$username,$password){$rez=fopen("test.txt","ab"); if ($link=mysql_connect ("$server","$username","$password",TRUE)) { fwrite($rez,"".$server." \r\n"); echo "Connected successfully to >> " .$server ; $result = mysql_query('SHOW DATABASES');echo "<br>";while ($row = mysql_fetch_array($result)){fwrite($rez, $row['DatabaseName']); } }}ini_set('max_execution_time', 10);return $link; ?>