ssh2_scp_send() using php corrupts pdf
I am having a problem when I am sending a pdf file to my server.
my script works when I try to send .csv file but the problem occurs when I try to send a pdf file
$con = ssh2_connect('myserver.com', 22);
ssh2_auth_password($con, $user, $pass);
ssh2_scp_send($con, $src, $trg);
when I send pdf. it creates a pdf file in target location but its corrupted.
Try adding this after the send to flush the buffer:
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Thanks, but it didn't work. I didn't saw any changes and still get corrupted pdf on my remote server.
Originally Posted by NogDog
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread