简体   繁体   中英

server downloading index.php instead of execution laravel

after one month of deploy my site in host and working normally. now i can't access in any page i get download index.php ?? why and how i can fix that ?

index.php

<?php

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

define('LARAVEL_START', microtime(true));

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


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


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

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

$response->send();

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

Check this 2 things.

  1. You have php installed on your server, php -v on the terminal
  2. The directory index for the web-server ex apache this can be on the main configuration or in a virtual host.
DirectoryIndex index.html index.php 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM