小编Are*_*res的帖子

尝试安装pecl扩展时,mac os x 10.7.3上的$ PHP_AUTOCONF错误

我正在尝试使用pecl_http和memcache设置我的机器,在这两种情况下,我都会遇到类似的错误.这是在MAC OS X 10.7.3(狮子)上,我也安装了XCODE.我还在运行这些命令之前安装了Zend Server社区版,并设置了CFLAGS =' - arch i386 -arch x86_64'环境变量.所以请帮助我做我需要做的事情

bash-3.2# **sudo pecl install pecl_http-1.7.1**
downloading pecl_http-1.7.1.tgz ...
Starting to download pecl_http-1.7.1.tgz (174,098 bytes)
.....................................done: 174,098 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
Run Code Online (Sandbox Code Playgroud)

php macos installation autoconf pecl

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

静态方法与功能的表现

在PHP中,(与我原先的想法不同),调用静态方法与简单函数的开销很大.

在一个非常简单的工作台上,开销超过调用时间的30%(该方法只返回参数):

// bench static method
$starttime = microtime(true);
for ($i = 0; $i< 10*1000*1000; $i++)
    SomeClass::doTest($i);

echo "Static Time:   " , (microtime(true)-$starttime) , " ms\n";

// bench object method
$starttime = microtime(true);

for ($i = 0; $i< 10*1000*1000; $i++)
    $someObj->doTest($i);

echo "Object Time:   " , (microtime(true)-$starttime) , " ms\n";

// bench function
$starttime = microtime(true);

for ($i = 0; $i< 10*1000*1000; $i++)
    something_doTest($i);

echo "Function Time: " , (microtime(true)-$starttime) , " ms\n";
Run Code Online (Sandbox Code Playgroud)

输出:

Static Time:   0.640204906464 ms
Object Time: …
Run Code Online (Sandbox Code Playgroud)

php oop performance

61
推荐指数
6
解决办法
3万
查看次数

指针缺少可空性类型说明符

在Xcode 7 GM中,我开始收到此警告:

指针缺少可为空类型说明符(_Nonnull,_Nullable或_Null_unspecified)

在以下函数声明中(NSUserDefaults扩展名)

- (void)setObject:(nullable id)value
           forKey:(NSString *)defaultName
    objectChanged:(void(^)(NSUserDefaults *userDefaults, id value))changeHandler
    objectRamains:(void(^)(NSUserDefaults *userDefaults, id value))remainHandler;
Run Code Online (Sandbox Code Playgroud)

为什么要显示此警告,我该如何解决?

objective-c ios objective-c-nullability

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

转换目标C中的日期格式

如何将以下日期"Sun Jul 17 07:48:34 +0000 2011"转换为以下格式"2011-07-17 07:48:34"?

我使用NSDateFormatter如下所示,但它没有工作.结果是null.

NSDateFormatter *objDateFormatter = [[NSDateFormatter alloc] init];
[objDateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
[objDateFormatter dateFromString:sDate];
Run Code Online (Sandbox Code Playgroud)

iphone objective-c nsdate nsdateformatter ios

30
推荐指数
2
解决办法
6万
查看次数

iOS模拟器在Mac上测试网站

我需要在Mac上的iOS设备上测试我的网站.

是否有桌面模拟器可以执行此操作?

testing ios safari-web-inspector

13
推荐指数
5
解决办法
10万
查看次数

PHP表单数据没有提交?

我想将信息从HTML表单传递到PHP页面.我的问题是表单中的数据没有提交.我究竟做错了什么 ?我在xxamp上使用phpmyadmin.我知道这是一个很长的代码,但只需要几秒钟就可以解决这个问题.我真的需要这个......谢谢

HTML表格

PHP代码:

if($_POST['FormSubmit'] == "Submit") 
{
    $errorMessage = "Connection cannot be established with the database!";

    if(empty($_POST['firstname'])) 
    {
        $errorMessage .= "<li>You forgot to enter your first name!</li>";
    }
    if(empty($_POST['surname'])) 
    {
        $errorMessage .= "<li>You forgot to enter your surname!</li>";
    }
    if(empty($_POST['email'])) 
    {
        $errorMessage .= "<li>You forgot to select your email!</li>";
    }


    $varDate = $_POST['preferred_date'];
    $varTime = $_POST['preferred_time'];
    $varAdult = $_POST['adult'];
    $varType = $_POST['excursion_type'];
    $varInfo = $_POST['add_info'];
    $varChildren = $_POST['children'];
    $varFname = $_POST['first_name'];
    $varSurname = $_POST['surname'];
    $varEmail = $_POST['email'];
    $varPhone = …
Run Code Online (Sandbox Code Playgroud)

html php

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

我为什么要在我的移动网站上使用精灵?

我为什么要在我的移动网站上使用sprite来构建CSS?如何在Tritium中实现它们?

css sprite tritium

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