我尝试将更改从我的本地仓库推送到远程仓库.当我输入:
git push origin
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Connection abandoned.
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?我在Windows 7中使用命令行中的git.
编辑
当我尝试做一个简单的ssh
ssh user@hostname
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Could not create directory '/c//%HOMEDRIVE%%HOMEPATH%/.ssh'.
percent_expand: unknown key %H
Run Code Online (Sandbox Code Playgroud)
不知何故,它不会创建目录,因为路径无效.如何解决这个问题?
@eckes:Edit2
我的家设置%HOMEDRIVE%%HOMEPATH%为这是正确的吗?
编写代码错误时,可能会出现警告和通知.我知道错误背后的想法.我想有一个警告可以告诉你一些可能导致错误的事情,但是不是一个通知也不一样吗?我想通知不是正确的事情的消息;).
这对我来说有点混乱.任何人都能说出这两者之间的区别以及这些消息的处理方式.
我正在尝试让一个网站处理我的测试环境,但不知何故它无法正常工作.我可以加载正常的索引页面,但是当我想访问/ page/test时,它会抛出一个错误,说该页面不存在.我的日志说:
File does not exist: /home/page_url/www/page
这实际上是正确的,但它应该到我的Page控制器而不是加载测试方法.
我的.htaccess看起来像:
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* /$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
Run Code Online (Sandbox Code Playgroud)
我的vhost配置如下:
<VirtualHost …Run Code Online (Sandbox Code Playgroud) 我正在查看有关PHP 5.4的alpha 1新闻,并找到一些被删除的内容.
在那个列表中他们谈论break/continue $var syntax.
我正在尝试使用名称空间.我想在不同的命名空间内扩展一个类.该类的名称是相同的.例:
家长:
namespace Base;
class Section extends Skeleton {
protected $id;
protected $title;
protected $stylesheet;
}
Run Code Online (Sandbox Code Playgroud)
儿童:
namespace Base2;
use \Base\Section;
class Section
extends \Base\Section {
}
Run Code Online (Sandbox Code Playgroud)
它是一个使用Doctrine 2和Zend Framework的应用程序.Base/Section使用的Skeleton类只是一个包含魔术方法(__ get,_set等)的抽象类.
当我尝试实例化\ Base2\Section类时,它会抛出一个错误:
Fatal error: Cannot declare class Base2\Section because the name is
already in use in /var/www/test/application/Models/Base2/Section.php
on line 7
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我在http://www.41latitude.com/post/1268734799/google-styled-maps上找到了一个代码段:
[
{
featureType: "administrative",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
featureType: "poi",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
featureType: "water",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
featureType: "road",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
}
]
Run Code Online (Sandbox Code Playgroud)
我应该可以在我的地图中使用它,但是有人可以告诉我如何使用这个片段吗?我在Google Maps V3的API中找不到任何相关信息.
我已将MacBook升级为Mavericks并破坏了我的开发环境.我现在遇到的问题是我的pear/pecl仍然尝试安装我之前的(5.3)版本的PHP而不是5.4版本.
PHP版本:
$ php -v
PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)
梨
$ pear version
PEAR Version: 1.9.4
PHP Version: 5.4.17
Zend Engine Version: 2.4.0
Running on: Darwin MBP-retina.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Run Code Online (Sandbox Code Playgroud)
如果我安装apc
$ sudo pecl install apc
downloading APC-3.1.13.tgz ...
Starting to download APC-3.1.13.tgz (171,591 …Run Code Online (Sandbox Code Playgroud) 什么是更好的选择:
// Option 1:
$intValue = (int) $numericValue;
// Option 2:
$intValue = intval($numericValue);
Run Code Online (Sandbox Code Playgroud)
这两行之间有什么区别,应该在哪种情况下使用?
我在执行Doctrine DQL查询时遇到问题.这是它给我的错误.
Doctrine\Common\Annotations\AnnotationException: [Syntax Error] Expected PlainValue,
got 'integer' at position 13 in property Base\Session::$lifetime.
Run Code Online (Sandbox Code Playgroud)
我的代码看起来像这样:
$query = $em->createQuery("SELECT s FROM Base\Session s WHERE s.session = \"$id\"");
Run Code Online (Sandbox Code Playgroud)
其中$ id是当前的session_id.我的模型看起来像:
namespace Base;
/** @Entity @Table(name="session") */
class Session extends Skeleton {
/**
* @Id @Column(type="integer")
* @GeneratedValue(strategy="AUTO")
*/
protected $id;
/** @Column(length=32) */
protected $session;
/** @Column(type=integer) */
protected $lifetime;
/** @Column(type=integer) */
protected $modified;
/** @Column(type="text") */
protected $data;
}
Run Code Online (Sandbox Code Playgroud) 下列:
我有大约20个型号.这些类扩展了一个基类.此基类包含一个方法,该方法应该能够确定子元素的类名.通常你可以这样:
get_called_class();
Run Code Online (Sandbox Code Playgroud)
但在许多情况下,doctrine 2使用ProxyClasses,在这种情况下,get_called_class()函数返回类似于:
Proxies\BasePageElementProxy
Run Code Online (Sandbox Code Playgroud)
而原始名称是\ Base\PageElement.任何人都可以告诉我如何找出这个类的名称是什么(没有生成字符串Proxies\BaseSectionProxy的名称,因为它是脏的,在许多情况下是不可靠的).
php ×8
.htaccess ×1
apc ×1
doctrine ×1
doctrine-orm ×1
gentoo ×1
git ×1
google-maps ×1
javascript ×1
kohana-3 ×1
namespaces ×1
orm ×1
pear ×1
pecl ×1
plink ×1
putty ×1
ssh ×1
syntax ×1
windows ×1