小编cor*_*ryj的帖子

找不到mcrypt =>调用未定义的函数Laravel\mcrypt_create_iv()

试图设置Laravel并继续遇到此错误.我通过brew安装了mcrypt,它位于/ usr/local/Cellar.有什么想法吗?..它没有出现在终端命令php -m中,如果这很重要.我正在使用macs本地Web服务器运行Mountaion Lion.

php mcrypt laravel osx-mountain-lion

46
推荐指数
4
解决办法
9万
查看次数

在Laravel中模板化

我正在尝试让我的默认模板与Laravel一起使用.我来自Codeigniter和Phil Sturgeon的模板系统,所以我试图以类似的方式做到这一点.任何人都可以帮我解决我错过/做错的事吗?谢谢!

//default.blade.php (located in layouts/default)
<html>
    <title>{{$title}}</title>
    <body>
    {{$content}}
    </body>
</html>
//end default.blade.php

//home.blade.php (index view including header and footer partials)
@layout('layouts.default')
@include('partials.header')
//code
@include('partials.footer')
//end home

//routes.php (mapping route to home controller)
Route::controller( 'home' );
//end

//home.php (controller)
<?php
class Home_Controller extends Base_Controller {
    public $layout = 'layouts.default';
    public function action_index()
    {   
        $this->layout->title = 'title';
        $this->layout->content = View::make( 'home' );
    }
}
//end
Run Code Online (Sandbox Code Playgroud)

php laravel laravel-3

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

试图通过AJAX发送输入文件数据,无法访问控制器中的数据

我正在使用Laravel 3,我在用户评论中使用AJAXing.我们正在为此评论添加图像,我似乎无法获取文件数据.当我将processData设置为false时,我也无法访问其他数据,例如评论和隐私.任何见解?

var commentforms = $('form.compose');
commentforms.on('submit', function(e){
  e.preventDefault();

  var file = document.getElementById('file_input').files[0];

  $.ajax({
    type: 'POST',
    url: '/issue/comment/' + issue_id,
    processData: false,
    data: {
      side: side,
      comment: comment,
      privacy: privacy,
      file: file,
    },
    success: function(response){
      console.log(response);
      new_comment = comment_template(response);
      updateSide(new_comment);
    },
});
Run Code Online (Sandbox Code Playgroud)

javascript ajax jquery laravel laravel-3

5
推荐指数
1
解决办法
1841
查看次数

克隆git存储库时权限被拒绝

所以我只是设置了一个Amazon EC2实例.并安装了git ..

sudo yum install git
Run Code Online (Sandbox Code Playgroud)

然后我用github设置我的ssh密钥.现在,当我尝试将我的repo克隆到/ var/www/html文件夹时,我收到此错误..

fatal: could not create work tree dir 'example.com'.: Permission denied
Run Code Online (Sandbox Code Playgroud)

当我以root身份运行时......

Cloning into 'example.com'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

但我确保我的github公钥与我的〜/ .ssh/id_rsa.pub键匹配.这里有什么我想念的吗?

linux git github amazon-ec2 git-clone

4
推荐指数
1
解决办法
5万
查看次数

Laravel - 使用刀片语法在部署期间呈现视图时出错

我收到这个错误:

Message:
View [partials.headerHome] doesn't exist.

Location:
/home/user/public/site.com/laravel/view.php on line 170
Run Code Online (Sandbox Code Playgroud)

由此刀片模板引起的包括

@include('partials.headerHome')
Run Code Online (Sandbox Code Playgroud)

当它通过模板引擎运行并最终进入/存储时转换为此

<?php echo view('partials.headerHome')->with(get_defined_vars())->render(); ?>
Run Code Online (Sandbox Code Playgroud)

我正在使用Linode,我相信我已经正确设置了所有内容,还有其他几个网站正常运行.我的文档根目录正在开发中.这可能是什么问题?

Currently sorting through the error log..
Run Code Online (Sandbox Code Playgroud)

apache linode laravel laravel-3

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