V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
skyboy
V2EX  ›  问与答

关于 laravel 的问题

  •  
  •   skyboy · 2016-12-08 14:40:59 +08:00 · 829 次点击
    这是一个创建于 2714 天前的主题,其中的信息可能已经有所发展或是发生改变。

    问题 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;
        }
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2851 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:38 · PVG 23:38 · LAX 08:38 · JFK 11:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.