Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Probelem z przejsciem php 5.1.6 na 5.2
munky
post
Post #1





Grupa: Zarejestrowani
Postów: 37
Pomógł: 0
Dołączył: 7.01.2005

Ostrzeżenie: (10%)
X----


Witam mam pewien problem licze na wasza pomoc.

Mam plik XML:

  1. ...
  2. <section id="4" lang="eng" parent="</span>">
  3.      <<span style='color:blue'>name>Pozycja_Menu_1</name>
  4.      <file>nazwa_pliku.php</file>
  5. </section>
  6. <section id="41" lang="eng" parent="4">
  7.      <name>Pozycja_Menu_1_1</name>
  8.      <file>inna_nazwa_pliku.php</file>
  9. </section>
  10. ...


mam do tego takowa metode w klasie:

  1. <?php
  2. ...
  3. $xmlSections=simplexml_load_file($this->file);
  4. $xmlSections2=simplexml_load_file($this->file);
  5.  
  6. foreach ($xmlSections as $xmlSection){
  7. if (($xmlSection['parent']=='') AND ($xmlSection['lang']==$this->lang)) {
  8.  $section = new SectionMenu($xmlSection['id'], utf8_decode($xmlSection->name), $xmlSection['lang'], $xmlSection->file);
  9.  foreach ($xmlSections2 as $xmlSubSection){
  10. if (($xmlSubSection['parent']==$xmlSection['id']) AND ($xmlSubSection['lang']==$this->lang)) {
  11.  $subSection = new SectionMenu($xmlSubSection['id'], utf8_decode($xmlSubSection->name), $xmlSubSection['lang'], $xmlSubSection->file);
  12. $section->addSubSection($subSection);
  13. }
  14.  }
  15.  $this->addSection($section);
  16. ....
  17. ?>


moze jest pozno i juz nie mysle ale nie wiem za cholere czemu mi nie zaczytuje drugiego forech-a :/. Wczesniej to wszystko ladnie dzialalo teraz poz mianie wersji w php przestalo zaczytuje pierwsza sekcje drugiej nie che.

Z gory dzieki za pomoc

Pozdrawiam
Munky

Czy ktos mi pomoze (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

Posty w temacie
- munky   Probelem z przejsciem php 5.1.6 na 5.2   21.12.2006, 19:16:01
- - hwao   Debuguj... Tu masz dobry projekt który może Ci po...   23.12.2006, 11:31:01
- - munky   thx hwao   24.12.2006, 10:57:01
- - envp   Kurna może nie przejrzałem dobrze, ale wg. mnie te...   24.12.2006, 11:47:40
- - hwao   Cytat(envp @ 24.12.2006, 11:47:40 ) K...   24.12.2006, 23:52:09


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.09.2025 - 10:34