php - Using ftp_*, how could I determine the public html directory? -


If I do not know the public web directory, then one method is that my script can determine the web directory, so that the script To know which directory to upload file?

If I do not know the public web directory, there is a way to determine my script web directory , So that the script will know which directory to upload the file?

If you are talking about determining the web root, the remote host that you are connecting to using FTP, the answer is no, certainly not .

The FTP account that you are using to log on, the root settings on that may be completely different, which is virtual host (configured) on the server. They have nothing to do with each other, and there is no way to interact.

Usually some overlaps (such as the FTP directory, such as /htdocs/domain.com / but no pattern you can depend on.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -