新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
PHP中construct是什么意思
本文操作環(huán)境:windows7系統(tǒng)、php7.1版、DELL G3電腦

PHP中construct是什么意思?
PHP __construct() 函數(shù)
__construct() 函數(shù)創(chuàng)建一個新的 SimpleXMLElement 對象。
如果成功,則該函數(shù)返回一個對象。如果失敗,則返回 false。
語法
__construct(data,options,is_url,ns,is_prefix)
參數(shù) data必需。形式良好的 XML 字符串或 XML 文檔的路徑或 URL。 options可選。規(guī)定附加的 Libxml 參數(shù)。 is_url可選。規(guī)定 data 參數(shù)是否是 URL。默認是 false。 ns可選。 is_prefix可選。
返回值
返回一個表示數(shù)據(jù)的 SimpleXMLElement 對象。
例子
XML; $xml = new SimpleXMLElement($xmlstring); echo $xml->body[0]; ?> George John Reminder Don't forget the meeting!
輸出類似:
Don't forget the meeting!
當(dāng)前文章:PHP中construct是什么意思
標題網(wǎng)址:http://www.fisionsoft.com.cn/article/djpgeds.html


咨詢
建站咨詢
