Question: I'm having a PhoneGap application that downloads a file from my server. The problem is that if I point phonegap FileTransfer.download uri directly to the file, the file can be downloaded. But, if I point the URI of FileTransfer.download to a download.php file that has the following:

```
header ("Content-type: octet/stream");
header ("Content-disposition: attachment; filename=".$file);
header("Content-Length: ".filesize($file));
readfile($file);
exit;

```

My phonegap application downloads the file. But it only has 1 byte of data and cannot download the content of my file ( It's a MP3 file ). 

Can someone let me know why this happens? I need to use the download.php file because I'm sending a hash to verify the user credentials before allowing the file to be downloaded. 

I've been working around a few hours on this and couldn't find a solution. Is there a proble m with the fileTransfer.download? Should I make additional settings to it?

Answer: 
I did not know that i understood you correctly or not. However, you can easily use insert function in vectors Here is simply example:

```
std::vector<int> X;   
std::vector<int> Y;
std::vector<int> XandY;   // result vector.

XandY.reserve( X.size() + Y.size() ); // allocate memory for result vector 
XandY.insert( XandY.end(), X.begin(), X.end() );  // make your insert operation..
XandY.insert( XandY.end(), Y.begin(), Y.end() );

```
I think I understand what you are getting at - you want something like this:

```
vector<vector<char>> tmp_fof;
vector<char> first_of_first;

first_of_first.insert(first_of_first.end(), tmp_fof.at(1).begin(), tmp_fof.at(1).end())
first_of_first.insert(first_of_first.end(), tmp_fof.at(1).begin(), tmp_fof.at(1).end())

```