object(OCI-Lob)#108 (1) { ["descriptor"]=> resource(117) of type (oci8 de"/> object(OCI-Lob)#108 (1) { ["descriptor"]=> resource(117) of type (oci8 de">
Maison > Article > développement back-end > php查询oracle返回字段读取,该如何处理
php查询oracle返回字段读取
php查询oracle数据库后,某个字段的值为:
["IJINFO"]=>
object(OCI-Lob)#108 (1) {
["descriptor"]=>
resource(117) of type (oci8 descriptor)
}
java查询后读出的该字段内容为文本
请问这种类型的字段在php中如何读取?
------解决方案--------------------
没法读取
他是一个java对象
------解决方案--------------------
是的,这个字段里面存储的是java对象
所以用java查询后读出的该字段内容为文本
现行oracle数据库是用java写成的,所以在oracle数据库中可以存储java对象,而不需要额外的开销
------解决方案--------------------
可以读取,如:
$arr_obj = array(["IJINFO"]=> object(OCI-Lob)#108 (1) { ["descriptor"]=> resource(117) of type (oci8 descriptor) })$aaa = $arr_obj["IJINFO"]->descriptor;echo "aaa-->>".$aaa."<br>";<br><font color="#e78608">------解决方案--------------------</font><br>不可以?我的是这样的:<br>
$mine_mail = Array ( [1] => stdClass Object ( [headers] => Array ( [content-type] => text/plain;charset="utf-8" ) [ctype_primary] => text [ctype_secondary] => plain [ctype_parameters] => Array ( [charset] => utf-8 ) [body] => vif5f+CM/R6Ej4pA3eq7wsRbp/0Irr4GDeqB92pDvW+PSo/lPdFmSvtae4vVFzdb0p64aXra0yH8H4RhY9CScEBzJ+/GpNmzmq8x2IMNRiqannBk5mBaB8zcNA96IQ1oLbwIQLZraCip7IIo3oT1j0uZ/YspW4SSWB4NfOr+554= [mime_id] => 1 ) [2] => stdClass Object ( [headers] => Array ( [x-attach-l] => 1 [content-type] => application/msword;name="netchina_1 ReleasedBy_sean(Data_2012-2-21).doc"; [content-transfer-encoding] => base64 [content-disposition] => attachment;filename="netchina_1 ReleasedBy_sean(Data_2012-2-21).doc" ) [ctype_primary] => application [ctype_secondary] => msword [ctype_parameters] => Array ( [name] => netchina_1 ReleasedBy_sean(Data_2012-2-21).doc ) [disposition] => attachment [d_parameters] => Array ( [filename] => netchina_1 ReleasedBy_sean(Data_2012-2-21).doc ) [body] => sasds)$body = $mine_mail[1]->body;$encoding = $mine_mail[1]->ctype_parameters['charset'];$filename = $mine_mail[2]->ctype_parameters['name'];<div class="clear"> </div>