jupper Posted September 7, 2004 Report Share Posted September 7, 2004 ir teksts, kuram pa vidu ir xml kods, piemēram: "dffhjdsf dsfh jdsfjdsf <?xml ::namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> jdsf dsjf jdshf jdshf jdsh " kā dabūt ārā to xml ar visu info, kas ir no tā sākuma taga līdz beigu tagam Link to comment Share on other sites More sharing options...
рпр Posted September 7, 2004 Report Share Posted September 7, 2004 ar regulaaro ekspresiju var, kaut kas uz sho pusi. par pareiziibu negaranteeju, rakstu no galvas. ereg_replace('<\?xml[^(/>)]*', '', $tasteksts); Link to comment Share on other sites More sharing options...
Venom Posted September 7, 2004 Report Share Posted September 7, 2004 ā) aizmirst par ereg_* bē) dotais piemērs neidzēsīs beidzamo />. try this: $text=preg_replace('#<\?xml[^(/>)]*/>#m', '', $text); Link to comment Share on other sites More sharing options...
jupper Posted September 7, 2004 Author Report Share Posted September 7, 2004 to Venom ja pirms <?xml ir atstarpe, tad viss straadaa, bet ja nav atstarpes, pirmeeram, </font><?xml tad nekas netiek izdzeests Link to comment Share on other sites More sharing options...
Venom Posted September 8, 2004 Report Share Posted September 8, 2004 nez gan, man ar #<\?xml[^(/>)]*/>#m viss ir čikiniekā, gadījumā neilieki iekš dubultpēdiņām, ķipa "#<\?xml[^(/>)]*/>#m" ? tad tiks apēsts <\? par <? Link to comment Share on other sites More sharing options...
jupper Posted September 8, 2004 Author Report Share Posted September 8, 2004 nē, ieliku pareizi, bet tāpat nedzēš ārā Link to comment Share on other sites More sharing options...
Venom Posted September 8, 2004 Report Share Posted September 8, 2004 (edited) pierādījums (index.php izpildās un parāda pats savus source-us) Edited September 8, 2004 by Venom Link to comment Share on other sites More sharing options...
Recommended Posts