如何修复Laravel中的gettallheaders.php错误?

时间:2019-06-07 16:52:43

标签: php laravel optimization

我正在建立一个laravel图表克隆网站,但经过一些开发后突然出现,当我运行php artisan服务时,会发生此错误。

  

PHP警告:require(I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php):无法打开流:I中没有此类文件或目录:第66行的\ LARAVEL \ laravel-instagram-clone \ vendor \ composer \ autoload_real.php

     

警告:require(I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php):无法打开流:I:\中没有此类文件或目录第66行的LARAVEL \ laravel-instagram-clone \ vendor \ composer \ autoload_real.php

     

PHP致命错误:require():无法打开所需的'I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php'(include_path ='C:\ I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer \ autoload_real.php上的xampp \ php \ PEAR')

     

严重错误:require():无法打开所需的'I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php'(include_path ='C:\ xampp \ php \ PEAR'),位于第66行的I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer \ autoload_real.php

     

I:\ LARAVEL \ laravel-instagram-clone> php工匠服务   PHP警告:require(I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php):无法打开流:I:\ LARAVEL \中没有此类文件或目录第66行上的laravel-instagram-clone \ vendor \ composer \ autoload_real.php

     

警告:require(I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php):无法打开流:I:\中没有此类文件或目录第66行的LARAVEL \ laravel-instagram-clone \ vendor \ composer \ autoload_real.php   PHP致命错误:require():无法打开所需的'I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php'(include_path ='C:\ xampp \ php \ PEAR'),位于第66行的I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer \ autoload_real.php

     

严重错误:require():无法打开所需的'I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer /../ ralouphie / getallheaders / src / getallheaders.php'(include_path ='C:\ xampp \ php \ PEAR'),位于第66行的I:\ LARAVEL \ laravel-instagram-clone \ vendor \ composer \ autoload_real.php

1 个答案:

答案 0 :(得分:2)

似乎缺少对作曲家的依赖。

打开终端,浏览到项目目录的根目录,然后尝试运行。

function enviaParaHanbai(pedido) { console.log(pedido); let urlPedidoCriado; $.ajax({ type: "POST", url: "http://servidor.hanbai:8081/api/aa/v1/pedidos", data: JSON.stringify(pedido), headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', }, success: function(data, status, request) { console.log(data); console.log(status); console.log(request); urlPedidoCriado = request.getResponseHeader('location'); console.log(urlPedidoCriado); const regex = /(?<=pedidos\/).*$/gi; let match = regex.exec(urlPedidoCriado); let idPedidoCriado = match[0]; console.log(idPedidoCriado); renderizaDivPedidoRealizadoComSucesso(idPedidoCriado); }, error: function (data, status, request) { console.log(data); console.log(request); console.log(status); console.log("erro no envio do pedido para o hanbai"); } }); }