You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I used this script, it works perfectly in the demo provided, but when i moved the files into my libraries folder, and then use it with a custom form input, i get the following error:
Notice: Undefined offset: 1 in C:******\libraries\Contact_Vcard_Parse.php on line 211
I'm using JQuery ajax to post the form and file like so:
var formData = new FormData();
formData.append('file', t[0].files[0]);
formData.append('func', 'convert');
formData.append('uid', uuid);
formData.append('token', token);
formData.append('_accesscode', '');
formData.append('_mailonly', '');
formData.append('_phoneonly', '');
Hi.
I used this script, it works perfectly in the demo provided, but when i moved the files into my libraries folder, and then use it with a custom form input, i get the following error:
Notice: Undefined offset: 1 in C:******\libraries\Contact_Vcard_Parse.php on line 211
I'm using JQuery ajax to post the form and file like so:
var formData = new FormData();
formData.append('file', t[0].files[0]);
formData.append('func', 'convert');
formData.append('uid', uuid);
formData.append('token', token);
formData.append('_accesscode', '');
formData.append('_mailonly', '');
formData.append('_phoneonly', '');
my php is the like so :
!empty($_POST['_mailonly']), 'phoneonly' => !empty($_POST['_phoneonly']), 'accesscode' => preg_replace('/[^1-9]/', '', $_POST['_accesscode']), )); $fileError = $_FILES['file']['error']; if ( $fileError != UPLOAD_ERR_OK ) { $out['res'] = encodeS( 1 ); echo json_encode( $out); return; } if ( $_FILES['file']['name'] != '' ) { $file_array = explode( ".", $_FILES['file']['name'] ); $extension = end( $file_array ); if ( strtolower($extension) == 'vcf' ) { if ( $conv->fromFile( $_FILES['file']['tmp_name'] ) ) { $temp_data = $conv->toCSV(); if(!temp_data){ $out['res'] = encodeS( 8 ); echo json_encode( $out ); return; } } else { $out['res'] = encodeS( 0 ); echo json_encode( $out ); return; } } else { $out['res'] = encodeS( 5 ); //not supported file echo json_encode( $out ); return; } } else { $out['res'] = encodeS( 4 ); //no file uploaded echo json_encode( $out ); return; } $out['res'] = encodeS( 6 ); // success $out['arr'] = $temp_data; echo json_encode( $out ); return; ?>Any ideas??
The text was updated successfully, but these errors were encountered: