laravel automatically deletes server.php on php artisan serve

吃可爱长大的小学妹 提交于 2019-12-01 23:54:20

问题


I am using laravel 5.6 on windows environment using php 7.2, (installed with xampp).After installing laravel the 'php artisan serve' command work but automatically deletes the server.php file .


回答1:


Just to avoid the answer to this getting buried, OP linked issue solution in the comment Link explaining issue and how to resolve

User had Avast antivirus running and it incorrectly flagged server.php as a malicious file, adding an exception to Avast for that file resolved the issue.




回答2:


Add the server.php as exception for Avast.

It seems that you have used Avast Antivirus in your system. It detects it as thread.




回答3:


For me :

When Avast antivirus running flagged server.php as a malicious file change this in menu - parameter - exclusions and change a line in server.php

if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) 

to

if ($uri !== '/' && file_exists(__DIR__.'laraveltest/public'.$uri)) 


来源:https://stackoverflow.com/questions/49704540/laravel-automatically-deletes-server-php-on-php-artisan-serve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!