如何正确地将文件夹从 filezilla 传输到 000webhost 服务器?

How to correctly transfer folders to 000webhost server from filezilla?

我是网站建设的初学者,所以如果我在描述我的问题时使用的术语不正确,我深表歉意。

我使用 filezilla 将一个网站传输到我由 000webhost 托管的服务器上。我将包含所有文件的文件夹放入 public_html 文件夹中。当我尝试打开网站时,我收到消息:

您看到此页面是因为您的网站在 public_html 文件夹中没有 "index.php" 或 "index.html" 文件。

当我将单个文件直接上传到 public_html 文件夹时,它能够识别和处理 index.php 文件,但当它位于上传到 public_html 的文件夹中时则不能文件夹。它是否无法处理我上传的文件夹中的任何文件,除非我将它们从文件夹中删除?还是我没有将文件夹转移到正确的位置?

您确定上传的不是文件夹本身,而是文件夹的 "contents" 吗?您需要确保,当您浏览到 FTP 服务器上的 public_html 文件夹(使用 filezilla)时,您可以看到 index.php 文件以及其他文件和子文件夹,而不仅仅是1 个文件夹。

我不知道 000webhost,但是在 public_html 下,你应该有这样的东西:

public_html
  ->  index.php
  ->  other_pages.php
  ->  images/
  ->  css/
  ->  blabla/

而不是:

public_html
  ->  your_folder/   # containing index.php

在 filezilla 中,浏览到您本地的文件夹,并在其中 "select all files and subfolders",然后将它们全部上传到服务器上的 public_html