skyboy
V2EX  ›  问与答

关于 laravel 的问题

  •  
  •   skyboy · Dec 8, 2016 · 1151 views
    This topic created in 3470 days ago, the information mentioned may be changed or developed.

    问题 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;
        }
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5588 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 07:36 · PVG 15:36 · LAX 00:36 · JFK 03:36
    ♥ Do have faith in what you're doing.