This is my code
$data = simplexml_load_file("data.xml");
$data -> mysuname = $_POST["mysqluname"];
$data -> myspwd = $_POST["mysqlpwd"];
$data -> mysdb = $_POST["db_name"];
$data -> saveXml();
But when I open the data.xml I couldn't find these values But echoing $_POST[variable] prints the value, so its not null
I figured out that, the problem is with SELinux in fedora, I disabled it and everything is fine.
you should try this:
$data = simplexml_load_file("data.xml");
$data -> mysuname = $_POST["mysqluname"];
$data -> myspwd = $_POST["mysqlpwd"];
$data -> mysdb = $_POST["db_name"];
$data -> asXML("data.xml");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.