试图设置Laravel并继续遇到此错误.我通过brew安装了mcrypt,它位于/ usr/local/Cellar.有什么想法吗?..它没有出现在终端命令php -m中,如果这很重要.我正在使用macs本地Web服务器运行Mountaion Lion.
我正在尝试让我的默认模板与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) 我正在使用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) 所以我只是设置了一个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键匹配.这里有什么我想念的吗?
我收到这个错误:
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)