[Plugin: WP CSV to Database – Insert CSV file content into WordPress database] Issue with fopen when
-
On installing this plugin, I found that I was able to upload my test csv file, but not import it into the database. I got :
Warning: fopen() [function.fopen]: Filename cannot be empty in /home/mywebsite/public_html/wp-content/plugins/wp-csv-to-database/wp-csv-to-db.php on line 94
and then :
“Error occured while trying to import!
Source file could not be opened!
Error on fopen(”)”so the file path had clearly gone AWOL.
I had a look at line 94, and noticed that it calls a variable called $file_path, so I looked at where that came from, and noticed that there were two versions of it, one commented out.
// $file_path = csv_to_db_convert_to_domain_path_from_src_file($src_file);
$file_path = csv_to_db_get_abs_path_from_src_file($src_file);So I tried uncommenting the first version and commenting out the second one instead, and hey presto, it worked.
Am just leaving a note about that here in case it helps someone else.
The topic ‘[Plugin: WP CSV to Database – Insert CSV file content into WordPress database] Issue with fopen when’ is closed to new replies.