(PHP 4 >= 4.3.2, PHP 5)
streamWrapper::__construct — Constructs a new stream wrapper
Called when opening the stream wrapper, right before streamWrapper::stream_open().
此函数没有参数。
codeslinger at compsalot dot com (2009-11-20 10:27:10)
Just to clarify what was said above, as far as I can tell, __construct is *only* called before stream_open.
It does not get called for other functions such as stream::url_stat or stream::unlink, even though those functions do create a new object.
This behavior is contrary to normal expectations for php object creation. But based on the documentation above I can only assume that it is by design.