简体   繁体   English

index.php不会加载laravel和wamp

[英]index.php don't load with laravel and wamp

I'm newbie. 我是新手。 So I got a problem with a laravel app. 所以我有一个laravel应用程序的问题。 I can access any url like www.test.com/something but it browser returns "This webpage is not available ERR_CONNECTION_RESET" any time when I try to open www.test.com/ or www.test.com/index.php 当我尝试打开www.test.com/或www.test.com/index.php时,我可以访问任何URL,如www.test.com/something,但浏览器会返回“此网页不可用ERR_CONNECTION_RESET”

I'm using Wamp server 2.5 我正在使用Wamp Server 2.5

httpd-vhosts.conf file httpd-vhosts.conf文件

    <VirtualHost *:80>
      DocumentRoot "c:/wamp/www/test/public"
      ServerName test.com
    </VirtualHost>

.htaccess 的.htaccess

   <IfModule mod_rewrite.c>
   <IfModule mod_negotiation.c>
      Options -MultiViews
   </IfModule>

   RewriteEngine On


   # Redirect Trailing Slashes...
   RewriteRule ^(.*)/$ /$1 [L,R=301]

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

   </IfModule>

got this line in the routes.php 在routes.php中获得了这一行

Route::get('/', 'PagesController@index');

LoadModule rewrite_module modules/mod_rewrite.so is uncommented. LoadModule rewrite_module modules / mod_rewrite.so未注释。 When I insert something like 当我插入类似

echo "test"; exit;

in the very beginning of the index.php, it works fine and the message appears. 在index.php的最开始,它可以正常工作并显示该消息。 The trick is that another project with the same settings works properly. 诀窍是具有相同设置的另一个项目可以正常工作。 Any ideas? 有任何想法吗?

EDIT: The problem was in the BLADE comments like {{-- smthg --}}. 编辑:问题出在像{{-smthg-}}之类的BLADE注释中。 Solved by replacing on ordinary html comments 通过替换普通的HTML注释解决

您需要告诉计算机test.com域托管在服务器上,您可以通过将其添加到主机文件中来实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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