title: How to transfer a file to the server using sftp?
body: <p>I'm new to PHP. I have the below details of my server. Now I need to upload (or move) a <code>.sql</code> file to the server from localhost application using SFTP. I've tried many and ended up with failures.</p>
  
  <ul>
  <li>Hostname</li>
  <li>Port Number</li>
  <li>Username</li>
  <li>Password</li>
  <li>Location</li>
  </ul>
  
  <p>Please anyone give me a simple example to connect SFTP connection to my server to upload a file.</p>