【发布时间】:2018-10-22 19:50:00
【问题描述】:
我正在尝试解决公司网站中的一些问题,但我不知道网站的主文件在哪里。 在 public_html 文件夹内没有 index.html 文件(或任何其他 .html),只有一个 index.php(我将在下面显示)和很多文件夹。我想对主网站 index.html(或网站在您访问时加载的 .html)做一个简单的更改。我怎样才能找到它?
这是 index.php:
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
【问题讨论】:
-
如果你没有使用 laravel 的经验,你可以阅读关于这个框架的文档。
-
好像没有
index.html。该 PHP 文件是入口点。如果您不了解它并想编辑该站点,那么您将不得不(至少)学习 PHP 的基础知识。 -
很可能没有
index.html文件,现在的网站是动态创建的,它们不是由静态html文件组成的。 -
这是您要检查的下一个文件。
require_once __DIR__.'/public/index.php';。通常在 MVC 框架上运行的 php 项目的所有请求都通过public/index.php编组 -
这取决于您要进行的更改,以了解您需要更改哪个文件。在那之前你需要学习laravel