object(EasySwoole\Core\Http\Message\UploadFile)#44 (6) {
["tempName":"EasySwoole\Core\Http\Message\UploadFile":private]=>
string(25) "/tmp/swoole.upfile.82hJyH"
["stream":"EasySwoole\Core\Http\Message\UploadFile":private]=>
object(EasySwoole\Core\Http\Message\Stream)#45 (6) {
["stream":"EasySwoole\Core\Component\Spl\SplStream":private]=>
resource(52) of type (stream)
["seekable":"EasySwoole\Core\Component\Spl\SplStream":private]=>
bool(true)
["readable":"EasySwoole\Core\Component\Spl\SplStream":private]=>
bool(true)
["writable":"EasySwoole\Core\Component\Spl\SplStream":private]=>
bool(true)
["readList":"EasySwoole\Core\Component\Spl\SplStream":private]=>
array(16) {
["r"]=>
bool(true)
["w+"]=>
bool(true)
["r+"]=>
bool(true)
["x+"]=>
bool(true)
["c+"]=>
bool(true)
["rb"]=>
bool(true)
["w+b"]=>
bool(true)
["r+b"]=>
bool(true)
["x+b"]=>
bool(true)
["c+b"]=>
bool(true)
["rt"]=>
bool(true)
["w+t"]=>
bool(true)
["r+t"]=>
bool(true)
["x+t"]=>
bool(true)
["c+t"]=>
bool(true)
["a+"]=>
bool(true)
}
["writeList":"EasySwoole\Core\Component\Spl\SplStream":private]=>
array(17) {
["w"]=>
bool(true)
["w+"]=>
bool(true)
["rw"]=>
bool(true)
["r+"]=>
bool(true)
["x+"]=>
bool(true)
["c+"]=>
bool(true)
["wb"]=>
bool(true)
["w+b"]=>
bool(true)
["r+b"]=>
bool(true)
["x+b"]=>
bool(true)
["c+b"]=>
bool(true)
["w+t"]=>
bool(true)
["r+t"]=>
bool(true)
["x+t"]=>
bool(true)
["c+t"]=>
bool(true)
["a"]=>
bool(true)
["a+"]=>
bool(true)
}
}
["size":"EasySwoole\Core\Http\Message\UploadFile":private]=>
int(288785)
["error":"EasySwoole\Core\Http\Message\UploadFile":private]=>
int(0)
["clientFileName":"EasySwoole\Core\Http\Message\UploadFile":private]=>
string(26) "103836s44klqli6xeldaoo.jpg"
["clientMediaType":"EasySwoole\Core\Http\Message\UploadFile":private]=>
string(10) "image/jpeg"
}
3 回答
侃侃无极
TA贡献2051条经验 获得超10个赞
首先你得要学会肿么看文档,第一个你已经找到类了,为何不直接看源代码呢.以下是我从源代码中截取的.
public function getStream()
{
// TODO: Implement getStream() method.
return $this->stream;
}
public function moveTo($targetPath)
{
// TODO: Implement moveTo() method.
return file_put_contents($targetPath,$this->stream) ? true :false;
}
public function getSize()
{
// TODO: Implement getSize() method.
return $this->size;
}
public function getError()
{
// TODO: Implement getError() method.
return $this->error;
}
public function getClientFilename()
{
// TODO: Implement getClientFilename() method.
return $this->clientFileName;
}
public function getClientMediaType()
{
// TODO: Implement getClientMediaType() method.
return $this->clientMediaType;
}
请自行查看源码.
UploadFile
- 3 回答
- 0 关注
- 474 浏览
添加回答
举报
0/150
提交
取消