我正在尝试在 ubuntu 上安装 mysql-5.5.29 源代码。每次我重新启动或启动服务时,它都会告诉我 MySQL Daemon 无法启动。
shell>>service mysql.server start
Starting MySQL
... * The server quit without updating PID file (/usr/local/mysql/data/ytl-HP-Pavilion- g4-Notebook-PC.pid).
shell>>less /usr/local/mysql/data/ytl-HP-Pavilion-g4-Notebook-PC.err
130106 12:20:27 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
130106 12:20:27 InnoDB: The InnoDB memory heap is disabled
130106 12:20:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130106 12:20:27 InnoDB: Compressed tables use zlib 1.2.7
130106 12:20:27 InnoDB: Using Linux native AIO
130106 12:20:27 InnoDB: Initializing buffer pool, size = 128.0M
130106 …Run Code Online (Sandbox Code Playgroud) 如果帐户(可能是电子邮件或手机)已通过验证码验证,我希望跳过验证码验证。
所以我写了一个colsure函数。如果session('captcha_validated_reset_account')等于用户输入的帐户,它将跳过验证码验证。
如果没有,程序将调用 laravel 验证规则,如“required|captcha”(captcha'来自https://github.com/mewebstudio/captcha)。
问题是我不知道如何在闭包中调用验证规则,我尝试返回“required|captcha”,但它没有按预期工作。
'captcha' => function($attribute, $val, $fail) use ($request) {
if (
! empty(session('captcha_validated_reset_account'))
&& session('captcha_validated_reset_account') == $request->input('account')
) {
return;
} else {
Rule::required... //and call a rule named 'captcha' to validate the captcha code from user input
//return 'required|captcha';
}
}
Run Code Online (Sandbox Code Playgroud)
有什么方法可以在闭包函数中调用 laravel 验证规则吗?
如何在CSS中水平居中10000px(或其他比全屏宽)的div?
例如
#widerdiv{
width:10000px;
height:100px;
border:#009933 1px solid;
}
Run Code Online (Sandbox Code Playgroud)
似乎"margin:0 auto"在这种情况下不起作用