Downloading only 2kb file why

Hii i am using some curl function with loop which automatically download file in a sequence from server to server mean i give path of my server folder in script and run that everything is working ok but problem is that is downloading file corectly but file sizes are only 2kb why not downloading real size ?

We can only help if you provide us with code.

well there is no problem in code
because if i download on my localhost from same file and from the same site that workds completely good mean download complete files but its happening on server

i think is this some php config setting problems ?or some other setting ?