thokchom Posted April 15, 2016 Share Posted April 15, 2016 (edited) Hi all ..... am a beginer in this field. its request anyone to help me.... I have 5000 pages as name 1.xml, 2.xml, 3.xml, ............. 5000.xml, so m trying to load the file name which sumited as value in input box.<?php// $page ='1.xml'; this is working $page =$_POST['pagename']; //but why here not able to load from the given input value (file name)$doc = new DOMDocument();$doc->load($page);$contains = $doc->getElementsByTagName("contains");foreach ($contains as $don) {foreach($don->childNodes as $child) {if ($child->nodeType == XML_CDATA_SECTION_NODE) {echo $child->textContent . "<br/>";}}}?><form action=" " method="post"><input name="pagename" value=" "/><input type="submit" name="my_form_submit_button" value="Click here to desire page"/></form></body> Edited April 15, 2016 by thokchom Link to comment Share on other sites More sharing options...
justsomeguy Posted April 15, 2016 Share Posted April 15, 2016 The obvious question would be what is in $_POST['pagename'], have you verified that? Is it a valid filename? It sounds like it's not. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now