msgbartop
PHP语言, PHP扩展, Zend引擎相关的研究,技术,新闻分享 – 左手代码 右手诗
msgbarbottom

10 Aug 08 留言


分享到:



407 Responses to “留言”

Pages: [41] 40 39 38 371 » Show All

  1. 雪候鸟 |

    @Jake 方法是属于类中, 而不是对象的. 反序列化的时候, 如果你当前执行上下文没有这个这个对象对应的类, 则会失败. 如果有, 那么方法也就自然有了(类中)

  2. Jake |

    请问下,PHP在序列化一个对象的时候,保存的是对象的属性,没有保存方法,在用到这个对象的时候,必须把对象包含进来,然后,可以正常使用。
    问题是:在反序列化一个对象的流程是什么样的,是先NEW了一个类,然后把属性赋值一下吗?
    教程上说,如果没有把对象包含进来,则对象的方法使用不对。在反序列化时候,具体的操作是什么?

  3. 雪候鸟 |

    @Daniel 这个是SAE帮忙后台操作的.

  4. Daniel |

    您好,请问您是怎么样在SAE上绑定自己的顶级域名的,用哪种方式,望赐教!谢谢,祝好!

  5. chutianyin |

    有个问题有点费解,请教一下
    get_headers 这个函数 在线手册
    http://cn.php.net/manual/zh/function.get-headers.php

    中文版本写的是
    Note:

    自 PHP 5.1.3 起本函数使用默认的流上下文,其可以用 stream_context_get_default()函数设定和修改。

    我现在生产版本是 5.2.11(linux环境fast_cgi模式)
    但是使用以后不生效

    英文版本里面写的是
    Changelog
    Version
    5.1.3
    Description
    This function now uses the default stream context, which can be set/changed with the stream_context_set_default() function.

    中文版和英文版写的不一样
    一个是stream_context_get_default,一个是stream_context_set_default

    但是stream_context_set_default这个函数写明了
    PHP 5 >= 5.3.0

  6. wiml |

    t.php里面的内容就是:
    <?php
    echo time();

  7. lpf |

    请教一个技术问题:
    function g($url){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);//不要输出,在curl_exec中返回

    $ret = curl_exec($ch);
    $errno = curl_errno($ch);
    if($errno){
    echo ‘Curl error #’.$errno.’: ‘ . curl_error($ch);
    $ret = ”;
    }
    curl_close($ch);
    return $ret;
    }
    用这段代码请求一个本的URL:
    for ($i=1; $i<=30000; $i++){
    $sec = g('http://192.168.1.8/test/t.php&#039 ;) ;
    if ($sec == ''){
    break;
    }
    echo $i.' ';
    flush();
    }
    请求到28000多次时,就会报:
    Curl error #7: Failed to connect to 192.168.1.8: Cannot assign requested address
    但http://192.168.1.8/test/t.php肯定没问题,我用浏览器访问,一切正常,用上面的g函数就是不行,但只要等个一分钟左右,就又恢复了可以了

Pages: [41] 40 39 38 371 » Show All

Leave a Reply

*