nahidshahin Posted March 15, 2008 Share Posted March 15, 2008 Dear great PHP programmers, Wish you Happy Easter. I am working with MediaWiki which is developed in PHP. I need to process some given input text and come up with a XML file which is upload-able in semantic MediaWiki using their given interface 'Special:Import'. User just press "insert" button and want to see the output page return by 'Special:Import' module. So my idea was to make same <form enctype='multipart/form-data'> element that 'Special:Import' use to submit the xml file. What I did is, Click Insert button From WIKI-> goto processAndUploadXML.php (outside WIKI) -> create XML -> create a HTML with <body onLoad="document.forms[0].submit();">... (go back to WIKI) so that user can't see the page Here I try to set upload-able file name using javascript when submitting the Form, some thing like file_dom.value = "$_SERVER['DOCUMENT_ROOT']./WikiTaskList.xml" But i'ts not working. My firebug (Firefox extention) gives "Security error code: 1000" error. And 'Special:Import' says no file found. Can any one suggest me what can I do? May be one idea is to create HTTP request by my hand using some "packet sniffer". But it may complex thing. (I don't have any idea about HTTP request creating what browser do for me ) Please Anyone share your idea. Sorry for boring details I explained here. Advance thanks -Nahid Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.