action为空,表示默认请求,会请求当前页面的url
比如当前页面是localhost:8080/setting/set_up
打开页面的时候是get请求,action请求的时候可以是post
<form action="" method="post" enctype="multipart/form-data" name="setup_form" id="setup_form">
PHP操作xml,注意中间加判断
$dom = new DOMDocument('1.0', 'utf-8');
$dom -> loadXML($xmlFileStr);//加载xml形式的字符串
$serverNode=$dom->getElementsByTagName('serverInfo');
$serverNode->item(0)->setAttribute('ip',$serverInfoIp);
$doc = new DOMDocument("1.0", "utf-8");//加载xml文件然后获取值
if(false != $doc -> load($xmlcmd)){
$serverInfo = $doc -> getElementsByTagName('serverInfo');
$serverInfoIp = $serverInfo -> item(0) -> getAttribute('ip');
}