问题 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;
}