小编use*_*533的帖子

Laravel Routes不工作,Apache配置只允许public/index.php/route

例:

Route::get('/get', function() {
    return 'get';
});
Run Code Online (Sandbox Code Playgroud)

要查看上面的路由,我必须导航到public/index.php/get.

我已经查看了很多SO帖子,并搜索了不同的东西,并没有产生任何影响(是的,我每次都重启apache).

这是我在公共目录中的.htaccess:

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
</IfModule>

# For all files not found in the file system, reroute the request to the
# "index.php" front controller, keeping the query string intact

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)

还有什么可能导致这种情况?我正在运行Ubuntu.

apache .htaccess laravel

20
推荐指数
4
解决办法
5万
查看次数

Laravel Gmail无法使用,"用户名和密码不被接受.了解详情..."

当我尝试通过运行Laravel 4的网站发送电子邮件时,我遇到了以下异常:

{"error":{"type":"Swift_TransportException","message":"Expected response code 250 but got code \"535\", with message \"535-5.7.8 Username and Password not accepted. Learn more at\r\n535 5.7.8 http:\/\/support.google.com\/mail\/bin\/answer.py?answer=14257 y70sm14744455qgd.3 - gsmtp\r\n\"","file":"\/var\/www\/vendor\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Transport\/AbstractSmtpTransport.php","line":386}}
Run Code Online (Sandbox Code Playgroud)

这是我的邮件配置:

return array(
  'driver' => 'smtp',
  'host' => 'smtp.gmail.com',
  'port' => 465,
  'from' => array('address' => 'mymail@gmail.com', 'name' => 'myname'),
  'encryption' => 'ssl',
  'username' => 'mymail@gmail.com',
  'password' => 'lol',
  'sendmail' => '/usr/sbin/sendmail -bs',
  'pretend' => false,
);
Run Code Online (Sandbox Code Playgroud)

我试过通过谷歌搜索这个问题找到的禁用链接,除了它没有什么区别.

有没有办法告诉谷歌"停止阻止这个IP,这是我"?

php gmail laravel

19
推荐指数
6
解决办法
5万
查看次数

标签 统计

laravel ×2

.htaccess ×1

apache ×1

gmail ×1

php ×1