試圖編寫一個XML文件填充從目錄列表中獲取的信息,但我無法弄清楚如何獲得createElement menthods與動態內容很好玩。動態XML與PHP
我很想試試像動態表一樣的標籤中的硬代碼,然後把整個輸出結果發佈到xml文件中,但我不知道如何將預格式標籤放入xml中。
我的XML需要被格式化爲這樣
<CONTENT>
<GALLERY name="**HARDCODED DATA**">
<CATEGORY name="**HARDCODED DATA BASED FROM DIRECTORY SEARCH 1**" desc="**HARDCODED DATA BASED FROM DIRECTORY SEARCH 1**" thumb="**HARDCODED DATA BASED FROM DIRECTORY SEARCH 1**">
<ITEM>
<file_path>**dynamic content from directory search**</file_path>
<file_width>**HARDCODED**</file_width>
<file_height>**HARDCODED**</file_height>
<file_title>**dynamic content from directory search**</file_title>
<file_desc>**Loaded from a seperate txt file, index to match with the index of the dir file**</file_desc>
<file_image>**Loaded from a seperate txt file, index to match with the index of the dir file**</file_image>
<featured_image>**Loaded from a seperate txt file, index to match with the index of the dir file**</featured_image>
<featured_or_not>**Loaded from a seperate txt file, index to match with the index of the dir file**</featured_or_not>
</ITEM>
****loop through for next ITEM****
</CATEGORY>
****start next category from secody directory search content****
</GALLERY>
****start gallery 2 and 3 here, same format at gallery 1****
</CONTENT>
請,如果你想要更多的幫助你添加PHP代碼所需的問題。 – 2012-07-13 16:58:15
有沒有鏈接進一步下來評論的全部來源,在這裏它再次http://maskedriders.info/Sources/Power%20Rangers/webplayer.phps – NekoLLX 2012-07-22 23:21:04