问题 1 ,为何下面的语句,在 mysql 客户端能执行,在 DB::select 就报 SQL 错,只能执行不带子查询的语句: select * from table1 where author=(select author from table1 order by coid desc limit 1); 只能执行下面的 select * from table1 order by coid desc limit 1;
问题 2 , nginx 到底要如何配置,才能把 /notfound.php 转到路由的 404 ,处理逻辑中去,而不是显示 nginx 404. 下面的 404 无论开启那个, nginx 都 reload 不成功。
root /laravel-master/public/;
index index.php index.html;
location / {
# try_files $uri $uri/ =404;
# try_files $uri /index.php;
# try_files $uri /index.php?$args;
# try_files $uri /index.php$is_args$args;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
# try_files $uri $uri/ =404;
# try_files $uri =404;
include snippets/fastcgi-php.conf;
# With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.