0

我尝试上传 4MB 的文件,但收到错误消息:
"The file "Faturamento.pbit" exceeds your upload_max_filesize ini directive (limit is 0 KiB)."

在我phpinfo()有这个价值观:

upload_max_filesize | 100MB | 100MB
memory_limit | 128M | 128M
max_file_uploads | 20 | 20

我的刀片输入:

@extends('system.system', ['activePage' => __($pageInfos['activeTag']), 'activeSubPage' => __($pageInfos['activeSubTag']), 'titlePage' => __($pageInfos['title'])])

{{-- @extends('system.system') --}}

{{--  CSS --}}
@section('HeaderCss')
    <link href="{{ mix('css/powerbi/document.css')}}" rel="stylesheet" />
@stack('styles')
@endsection

{{--  CONTEUDO --}}
@section('content')

<div class="row">
    <div class="col-md-12">
        <form action="makedocument" method="post" enctype="multipart/form-data">
        @csrf
        @component('system.partials._cardWithIcone', ['icone' =>'fas fa-file', 'cardTitle' => 'Arquivo',
        'footerCenter' => true])
        @slot('slot1')
            <div class="row">
                <div class="col-md-12">
                    <label class="form-label d-none" for="pbit_file">Arquivo Pbit</label>
                    <span class="btn btn-green btn-round btn-file col-md-12">
                        <span class="fileinput-new">Select .PBIT</span>
                        <input type="file" id="pbit_file" name="pbit_file">
                    </span>
                </div>
            </div>
        </form>
        @endslot
        @slot('slot2')
        @endslot
        @endcomponent
    </div>
</div>
@endsection

{{--  JAVASCRIPT --}}
@section('FooterScript')
@parent
<script src="{{ mix('js/powerbi/document.js') }}" defer></script>
@endsection

在哪里接收 mthe 文件:

<?php

namespace App\Http\Controllers\PowerBI;

//use Illuminate\Http\UploadedFile;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use ZipArchive;

class PowerBIController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        //$this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function document()
    {
        return view("system.powerbi.document")->with([
            "pageInfos" => [
                "title" => "Gerar Documentação",
                "activeTag" => "PowerBI", //Tag de ativar a pagina no menu
                "activeSubTag" => "Documentação" //Tag de ativar a pagina no menu
            ],
        ]);
    }

    public function makeDocument(Request $request)
    {
        $filePbit = $request->file("pbit_file");

        if (empty($filePbit)) {
            return false;
        }
    }
}
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

我在堆栈溢出中搜索解决方案,但查看 php.ini 何时为 2mb 且错误消息中没有 0kbs;我更改了 中php.ini的几个选项,这些选项是我在其他问题中找到的;

谢谢

4

0 回答 0