[英]How to access [_host:protected] in Zend Framework and PHP
使用Zend amazon服务,我已经到了那里。
$url=$result->LargeImage->Url;
print_r($url);
这个输出是:
Zend_Uri_Http Object
(
[_username:protected] =>
[_password:protected] =>
[_host:protected] => ecx.images-amazon.com
[_port:protected] =>
[_path:protected] => /images/I/41voDxJS62L.jpg
[_query:protected] =>
[_fragment:protected] =>
[_regex:protected] => Array
(
[escaped] => %[[:xdigit:]]{2}
[unreserved] => [A-Za-z0-9-_.!~*'()\[\]]
[segment] => (?:%[[:xdigit:]]{2}|[A-Za-z0-9-_.!~*'()\[\]:@&=+$,;])*
[path] => (?:\/(?:(?:%[[:xdigit:]]{2}|[A-Za-z0-9-_.!~*'()\[\]:@&=+$,;])*)?)+
[uric] => (?:%[[:xdigit:]]{2}|[A-Za-z0-9-_.!~*'()\[\];\/?:@&=+$,])
)
[_scheme:protected] => http
)
我们不能做echo $ url - > _ host:protected here,因为'protected'是关键字。
我该如何访问? 有人可以帮忙吗?
谢谢
使用吸气剂。
$result->LargeImage->Url->getHost()
要么
$url->getHost()
请参阅文档: http : //framework.zend.com/apidoc/1.9/Zend_Uri/Zend_Uri_Http.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.