小编ycl*_*aes的帖子

Laravel 5.2获取Linux系统环境变量

是否有可能获得一些Linux系统环境变量并仍然使用.env变量?

我们希望使用自动生成的数据库密码,该密码被设置为Linux环境变量,但无法让Laravel找到Linux系统环境变量.

php linux laravel laravel-5.2

12
推荐指数
1
解决办法
2456
查看次数

Gulp与Laravel Elixir抛出events.js:141未处理的'错误'事件

从昨天开始,gulp抛出未处理的错误事件:

"C:\Program Files (x86)\JetBrains\PhpStorm 10.0.1\bin\runnerw.exe" "C:\Program >Files\nodejs\node.exe" C:\..\..\..\..\..\node_modules\gulp\bin\gulp.js --color -->gulpfile "d:\..\..\..\gulpfile.js" default
[11:41:02] Using gulpfile d:\..\..\..\gulpfile.js
[11:41:02] Starting 'default'...
[11:41:02] Starting 'sass'...

Fetching Sass Source Files...
   - resources\assets\sass\app.scss


Saving To...
   - public\css\app.css

[11:41:02] Finished 'default' after 323 ms
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: no writecb in Transform class
    at afterTransform (d:\..\..\..\node_modules\gulp-autoprefixer\node_modules\readable->stream\lib\_stream_transform.js:95:33)
    at Immediate.TransformState.afterTransform (d:\..\..\..\node_modules\gulp->autoprefixer\node_modules\readable-stream\lib\_stream_transform.js:79:12)
    at Immediate.immediate._onImmediate (timers.js:435:18)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
Run Code Online (Sandbox Code Playgroud)

我已经删除了所有的node_modules并重新安装它们而没有运气.

其他人有这个问题吗?

版本:

  • Laravel Framework版本5.1.24(LTS)
  • 节点:4.2.2
  • npm:3.5.1
  • 吞咽:3.90

php node.js laravel gulp laravel-elixir

7
推荐指数
1
解决办法
1149
查看次数

CodeIgniter form_validation未显示错误

我的表单验证错误停止工作,它昨天工作,我一定做错了什么但似乎无法找到它.

当我填写用户名和电子邮件地址时,它会发送电子邮件并回显"电子邮件已发送!".

当我点击注册而不填写任何信息时,它只是重定向到加载视图的用户/注册.

控制器/ user.php的:

public function signup_validation() {
    $this -> load -> library('form_validation');

    $this -> form_validation -> set_rules('username', 'Username', 'trim|required|alpha|min_length[3]|max_length[25]');
    $this -> form_validation -> set_rules('email', 'Email', 'required|trim|valid_email|is_unique[users.email]');
    $this -> form_validation -> set_rules('password', 'Password', 'required|trim');
    $this -> form_validation -> set_rules('cpassword', 'Retype', 'required|trim|matches[password]');

    if ($this -> form_validation -> run()) {
        $key = md5(uniqid());

        $this -> load -> library('email', array('mailtype' => 'html'));
        $this -> load -> model('users');
        $this -> email -> from('', "");
        $this -> email -> to($this -> input -> post('email')); …
Run Code Online (Sandbox Code Playgroud)

html php forms validation codeigniter

3
推荐指数
1
解决办法
8991
查看次数