您好,欢迎访问一九零五行业门户网

表单提交数据 没有action 没有enctype解决思路

表单提交数据 没有action 没有enctype
要提交图片  csv文件的上传   表单里面只有id 很name  这样可以实现文件上传吗。还不能用submit 只能用button的js提交
//能实现么
------解决方案--------------------
直接用js赋action属性,然后提交!
------解决方案--------------------
你说呢???
------解决方案--------------------
可以用远程提交
a.php 发送页面
 @c:\\wbiaoarticle\\13575672507.jpg,
// te_name  => time(),
// te_password  => ab--__==##%^cdziy!!> // su_deal  => 开始处理,
// );
$struseragent = mozilla/5.0 (windows nt 6.1; wow64) applewebkit/535.1 (khtml, like gecko) chrome/14.0.835.202 safari/535.1;
// $arrhttpheader = array('x-forwarded-for:8.8.8.8', 'client-ip:192.168.8.8'); //构造ip
if(!is_file($cookie_jar))
{
$cookie_jar = dirname(__file__).\\cookie_mytem.txt;
if(is_file($cookie_jar))
unlink($cookie_jar); //先清除cookie
}
//提交
$ch = curl_init();
curl_setopt($ch, curlopt_url, $strsumbitpage); 
if(!empty($ref_url))
curl_setopt($ch, curlopt_referer, $ref_url); 
curl_setopt($ch, curlopt_post, 1);
curl_setopt($ch, curlopt_postfields, $data);
curl_setopt($ch, curlopt_cookiejar, $cookie_jar); //cookie存放位置
// if(count($arrhttpheader))
curl_setopt($ch, curlopt_httpheader, $arrhttpheader);  //构造ip
curl_setopt($ch, curlopt_header,1);
curl_setopt($ch, curlopt_returntransfer, true);
if(!empty($struseragent)) //用户代理
curl_setopt($ch, curlopt_useragent, $struseragent); //设置ua
curl_setopt($ch, curlopt_ssl_verifypeer, false);
curl_setopt($ch, curlopt_ssl_verifyhost, false);
$str = curl_exec($ch);
curl_close($ch);
if(strlen($str) == 0)
return 0;
return $str;
}
$data = array(
file1  => @c:\\wbiaoarticle\\13575672507.jpg,
te_name  => time(),
te_password  => ab--__==##%^cdziy!!> su_deal  => 开始处理,
);
func_datapost($strurl, $data);
?>
接收页面
b.php
其它类似信息

推荐信息