php - 如何在插件域内安装 laravel

标签 php mysql laravel laravel-5

我的项目名称是yadavarpro

我在 public_html 后面创建了一个 yadavarpro 文件夹,并复制了除 public 之外的所有文件夹。

(我无法在 StackOverflow 上上传图像!)

喜欢这张图片:

http://yadavarpro.com/1.JPG

我在 public_html 中创建了另一个 yadavarpro 文件夹,并复制 public 文件夹的所有内容。

喜欢这张图片:

http://yadavarpro.com/2.JPG

但我的网站显示白屏。我想我应该更改 Bootstrap 配置。 但我不知道。

http://yadavarpro.com/

最佳答案

我解决了:

public_html/yadavarpro内编辑index.php:

用途:

<?php

/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/

require __DIR__.'/../../yadavarpro/bootstrap/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/../../yadavarpro/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

而不是:

<?php

/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/

require __DIR__.'/../bootstrap/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/../bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

关于php - 如何在插件域内安装 laravel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44592493/

相关文章:

使用 2 个模型和 2 个 Controller 的 Laravel 路由

php - 如何使用 codeigniter 3 调用 hooks 文件夹中的库?

php - 如何让 PHP 的 fgetcsv() 识别 Classic Mac (CR) 换行符?

javascript - 有没有更合适的方法来使用 AJAX 处理错误?

mysql - SQL查询来计算不同值的数量

拉维尔 "The page has expired due to inactivity"

php - Laravel - 存储购物车有多个数据到数据库

php - 从祖先列表构建树的最简单方法

php - 为什么我的 Highcharts 堆积面积样条图看起来很有趣?

java - 当应用程序尝试将数据写入数据库时​​出现 JBAS011469 错误。 (JBossAS7, MySql)