title: How to find the web root of a hosting in PHP
body: <p>How to find the <strong>web root</strong> (www, html_public, etc) of a hosting to upload files automatically via the PHP ftp_put() function ?</p>
  
  <blockquote>
    <p>The purpose is to propose the installation of a PHP script via a form
    or the users could send their FTP login.</p>
    
    <p>Then, with a function PHP would upload and install the script remotely
    on the server. My complete function works perfectly, however I was
    unable to determine the web directory of the server.</p>
  </blockquote>
  
  <p>Thank you in advance for your help.</p>
  
  <p>Kind regards</p>