小编Dev*_*rma的帖子

谷歌自定义搜索自动完成不起作用

我正在实施Google自定义搜索,我想在我的自定义搜索框中自动完成,即使我已经从我的控制面板启用了自动完成功能,但它仍未显示.这个你能帮我吗.谢谢

google-custom-search

6
推荐指数
1
解决办法
2032
查看次数

从Laravel 4中的MSSQL存储过程读取多个结果集

我从MSSQL Server 2012中的存储过程中获取数据(使用SQLSRV驱动程序),它返回多个结果集,但我能够使用以下代码读取第一个结果集

$res = DB::select('EXEC Procedure_Name ?,?,?,?',
                    array(
                            $Prama1,
                            $Prama2,
                            $Prama3, 
                            $Prama4
                        ));
Run Code Online (Sandbox Code Playgroud)

这会返回四个结果集,但是当我打印$ res时,我只得到第一个结果集,如何读取其他结果集?任何提示都会有很大的帮助.

更新:

在stackoverflow上找到一些线索并编译这个解决方案,不知道它是否是实现这一目标的优化方法.如果您有更好的方法,请分享.

    $stmt = $db->prepare("EXEC Procedure_Name ?,?,?,?");

    $type = "Type";
    $fromDate = "01-Mar-2014";
    $toDate = "15-Mar-2014";
    $adminId = 0;
    $stmt->bindParam(1, $type);
    $stmt->bindParam(2 , $fromDate);
    $stmt->bindParam(3 , $toDate);
    $stmt->bindParam(4 , $adminId);
    $stmt->execute();

        $search = array();
    do {
         $search = $stmt->fetchAll();   

         print '<pre>'; print_r($search); 
    } while ($stmt->nextRowset());
Run Code Online (Sandbox Code Playgroud)

laravel laravel-4

6
推荐指数
1
解决办法
843
查看次数

ReflectionException - 中间件类不存在Laravel 5.2

我在Laravel 5.2中使用无状态HTTP基本身份验证构建API,根据文档无状态HTTP基本身份验证,我创建了以下中间件

应用程序/ HTTP /中间件/ AuthenticateOnceWithBasicAuth.php

<?php

namespace Illuminate\Auth\Middleware;

use Auth;
use Closure;

class AuthenticateOnceWithBasicAuth
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */

    public function handle($request, Closure $next)
    {
        return Auth::onceBasic() ?: $next($request);

    }

}
Run Code Online (Sandbox Code Playgroud)

然后在Kernel.php中注册它

应用程序/ HTTP/kernel.php

protected $routeMiddleware = [
    'auth' => \App\Http\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
    'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
    'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
    'auth.basic.once' => \App\Http\Middleware\AuthenticateOnceWithBasicAuth::class,
];
Run Code Online (Sandbox Code Playgroud)

我在路线中使用它如下

Route::group(['prefix' => 'admin', 'middleware' …
Run Code Online (Sandbox Code Playgroud)

middleware laravel laravel-5 laravel-5.1 laravel-5.2

6
推荐指数
1
解决办法
2万
查看次数

NGINX没有在Ubuntu 14.04上监听端口443

我已经在Ubuntu 14.04上安装了nginx服务器(v1.4.6)。Nginx正在监听端口80,但不在端口443上。

输出

netstat -lpn |grep :80
tcp        0      0 0.0.0.0:80              0.0.0.0:*          
LISTEN      22333/nginx     
tcp6       0      0 :::80                   :::*                 
LISTEN      22333/nginx     
Run Code Online (Sandbox Code Playgroud)

但是netstat -lpn | grep:443不显示任何内容。

以下是UFW状​​态的结果

ufw status
Status: active

To                         Action      From
--                         ------      ----
443                        ALLOW       Anywhere
22                         ALLOW       Anywhere
80                         ALLOW       Anywhere
3306                       ALLOW       Anywhere
8080                       ALLOW       Anywhere
443 (v6)                   ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
3306 (v6)                  ALLOW       Anywhere (v6)
8080 (v6)                  ALLOW       Anywhere (v6)
Run Code Online (Sandbox Code Playgroud)

这是我的nginx confi

server { …
Run Code Online (Sandbox Code Playgroud)

ubuntu nginx ubuntu-14.04

5
推荐指数
0
解决办法
4930
查看次数