您好,将我的 laravel 项目复制到其他计算机后,当我尝试在其上 php artisan 服务它时,我在 localhost:8000 上收到此消息。谁能解释一下这是什么意思?我删除了.json会话文件,但仍然一无所获。
Whoops, looks like something went wrong.
1/1 InvalidArgumentException in FileViewFinder.php line 137: View [index2] not found.
in FileViewFinder.php line 137
at FileViewFinder->findInPaths('index2', array('C:Userschris-basicDesktoppresourcesviews')) in FileViewFinder.php line 79
at FileViewFinder->find('index2') in Factory.php line 174
at Factory->make('index2', array(), array()) in helpers.php line 855
at view('index2') in web.php line 20
at RouteServiceProvider->{closure}() in Route.php line 176
at Route->runCallable() in Route.php line 147
at Route->run(object(Request)) in Router.php line 644
at Router->IlluminateRouting{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->IlluminateRouting{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->IlluminatePipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->IlluminateRouting{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->IlluminatePipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->IlluminateRouting{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->IlluminatePipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->IlluminateRouting{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->IlluminatePipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->IlluminateRouting{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->IlluminatePipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->IlluminateRouting{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->IlluminatePipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->IlluminateRouting{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 646
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 620
at Router->dispatchToRoute(object(Request)) in Router.php line 598
at Router->dispatch(object(Request)) in Kernel.php line 267
at Kernel->IlluminateFoundationHttp{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->IlluminateRouting{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->IlluminatePipeline{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->IlluminateRouting{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 54
at require_once('C:xampphtdocstest2publicindex.php') in server.php line 21
Whoops, looks like something went wrong.
1/1 ErrorException in Filesystem.php line 111: file_put_contents(C:Userschris-basicDesktoppstorageframework/sessions/y4WU6ifJfcMd2ffoFyIZebwPw5ZCJyRxwHMLds2V): failed to open stream: No such file or directory
in Filesystem.php line 111
at HandleExceptions->handleError('2', 'file_put_contents(C:Userschris-basicDesktoppstorageframework/sessions/y4WU6ifJfcMd2ffoFyIZebwPw5ZCJyRxwHMLds2V): failed to open stream: No such file or directory', 'C:xampphtdocstest2vendorlaravelframeworksrcIlluminateFilesystemFilesystem.php', '111', array('path' => 'C:Userschris-basicDesktoppstorageframework/sessions/y4WU6ifJfcMd2ffoFyIZebwPw5ZCJyRxwHMLds2V', 'contents' => 'eyJpdiI6IlFrWUVnRCszeEwxem44UXc2dWZZaVE9PSIsInZhbHVlIjoiU1JRU3J6ckx2eTFSc0RjSnArQnBPYzdiTktORVVCNTBkRUF5MHh6M2hqM1I0QnlWNEtPYTRlOWx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RDQxYUN2TlE2T2ZaXC9cLzBwQlZZYUlhUVd5Vko0QUtYbDJKZU5wMVNLMmN6N3pqQjh2ZHdlTlpvcTRyOG9mbUQwQ3lpOWwxTjByck42SGM0dmFBST0iLCJtYWMiOiI4Y2JkOGEwN2NiNjA5NDc4NTQzZTRlZTJhZTIxOTI2MmE5MzUzODVlMGNkZTZiMTRkM2E2NTlkY2EzMDRlNjM5In0=', '2') in Filesystem.php line 111
at Filesystem->put('C:Userschris-basicDesktoppstorageframework/sessions/y4WU6ifJfcMd2ffoFyIZebwPw5ZCJyRxwHMLds2V', 'eyJpdiI6IlFrWUVnRCszeEwxem44UXc2dWZZaVE9PSIsInZhbHVlIjoiU1JRU3J6ckx2eTFSc0RjSnArQnBPYzdiTktORVVCNTBkRUF5MHh6M2hqM1I0QnlWNEtPYTRlOWxyOWduSDR5Z3RxakZ2cjRFWWRwQ2U3Z0VcL3JLbHVBSG5FWlwvNGNVNUQrSWROUGM5eG8zdkVjaGR5RW5mdTNCZzk4S0M4OEsySUppdFwvYnN4VGtveEhLbndrT1lEc2hRS28wMXJnT1h5R2lYXC9ZdUtYN2ZKd2I5Mzl5aG1CYnJmdlcxTk1WYmxLM25VT0hnTWRcLyt1QUM4dkd4cnpBRGE3UzAwZ1JKbldkTHhCQndMUnRGWWFORER2WGxHQkVFWTlqY3FwSFhGcjFPdFhqTFU0eEhoaHdaYUs2ZUJJbjk1QmE4RDQxYUN2TlE2T2ZaXC9cLzBwQlZZYUlhUVd5Vko0QUtYbDJKZU5wMVNLMmN6N3pqQjh2ZHdlTlpvcTRyOG9mbUQwQ3lpOWwxTjByck42SGM0dmFBST0iLCJtYWMiOiI4Y2JkOGEwN2NiNjA5NDc4NTQzZTRlZTJhZTIxOTI2MmE5MzUzODVlMGNkZTZiMTRkM2E2NTlkY2EzMDRlNjM5In0=', true) in FileSessionHandler.php line 83
at FileSessionHandler->write('y4WU6ifJfcMd2ffoFyIZebwPw5ZCJyRxwHMLds2V', 'eyJpdiI6IlFrWUVnRCszeEwxem44UXc2dWZZaVE9PSIsInZhbHVlIjoiU1JRU3J6ckx2eTFSc0RjSnArQnBPYzdiTktORVVCNTBkRUF5MHh6M2hqM1I0QnlWNEtPYTRlOWxyOWduSDR5Z3RxakZ2cjRFWWRwQ2U3Z0VcL3JLbHVBSG5FWlwvNGNVNUQrSWROUGM5eG8zdkVjaGR5RW5mdTNCZzk4S0M4OEsySUppdFwvYnN4VGtveEhLbndrT1lEc2hRS28wMXJnT1h5R2lYXC9ZdUtYN2ZKd2I5Mzl5aG1CYnJmdlcxTk1WYmxLM25VT0hnTWRcLyt1QUM4dkd4cnpBRGE3UzAwZ1JKbldkTHhCQndMUnRGWWFORER2WGxHQkVFWTlqY3FwSFhGcjFPdFhqTFU0eEhoaHdaYUs2ZUJJbjk1QmE4RDQxYUN2TlE2T2ZaXC9cLzBwQlZZYUlhUVd5Vko0QUtYbDJKZU5wMVNLMmN6N3pqQjh2ZHdlTlpvcTRyOG9mbUQwQ3lpOWwxTjByck42SGM0dmFBST0iLCJtYWMiOiI4Y2JkOGEwN2NiNjA5NDc4NTQzZTRlZTJhZTIxOTI2MmE5MzUzODVlMGNkZTZiMTRkM2E2NTlkY2EzMDRlNjM5In0=') in Store.php line 262
at Store->save() in StartSession.php line 88
at StartSession->terminate(object(Request), object(Response)) in Kernel.php line 176
at Kernel->terminate(object(Request), object(Response)) in index.php line 58
at require_once('C:xampphtdocstest2publicindex.php') in server.php line 21
移动项目的最佳方式是通过 git
。如果要手动执行此操作,请复制除 vendor
之外的所有文件夹,然后运行 composer install
。
我同意@Mirceac21。最好的方法是通过git
。
如果您不喜欢它,则在没有vendor
目录的情况下archive
项目并迁移然后运行composer install
会更安全。
Laravel是一个框架,因此您需要所有文件以正确的顺序执行。所以你需要保持它的完整性。因此,完美的解决方案将是git
。那么,为什么要通过做其他事情来浪费时间呢?