迅睿開源框架是一款PHP8高性能·簡(jiǎn)單易用的PHP開源開發(fā)框架, 基于MIT開源許可協(xié)議發(fā)布,不限制商業(yè)使用,以多端互聯(lián)為設(shè)計(jì)理念, 支持的微信公眾號(hào)、小程序、APP客戶端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
業(yè)務(wù)經(jīng)理
微信掃描以上二維碼
028-61286886
在線咨詢
在后臺(tái)新建了個(gè)網(wǎng)站表單,然后電腦版可以正常留言,但是手機(jī)版用電腦版的代碼提交留言時(shí)提示“系統(tǒng)錯(cuò)誤”,
把表單提交地址改成手機(jī)版綁定的域名提示“跨站驗(yàn)證禁止此操作”,
請(qǐng)問是什么原因,怎么解決?
有沒有在不修改表單提交地址和關(guān)閉后臺(tái)跨站驗(yàn)證的情況下解決第一個(gè)那種問題呢?
地址給我看看
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
是本地環(huán)境,
電腦端代碼:<div id="submit" class="btn" onclick="dr_ajax_submit('http://localhost:88/index.php?s=form&c=zaixianyuyue&m=post', 'myform', '2000', 'index.php#yuyue')">立即預(yù)約</div>
移動(dòng)端代碼:<div id="submit" class="btn" onclick="dr_ajax_submit('http://localhost:89/index.php?s=form&c=zaixianyuyue&m=post', 'myform', '2000', 'index.php#yuyue')">立即預(yù)約</div>
回復(fù)迅睿框架創(chuàng)始人
再咨詢個(gè)小白問題,如果源碼上傳到服務(wù)器上,電腦端域名是www.yuming.com,移動(dòng)端域名是wap.yuming.com,到時(shí)候移動(dòng)端再向電腦端提交信息算是跨站嗎?
域名不同就算跨域了,你這個(gè)域名是不同的。
你把整個(gè)form標(biāo)簽體的代碼發(fā)了看看
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
<input name="is_form" type="hidden" value="1">
<input name="is_admin" type="hidden" value="0">
<input name="is_tips" type="hidden" value="">
<input name="csrf_test_name" type="hidden" value="de343a2dc4e7b899cb347f9b132e21d2">
<div class="inputColumns clearfix">
<div class="column2" style="width:100%">
<div class="columnInner">
<input type="text" name="data[xingming]" id="dr_xingming" value="" placeholder="您的姓名 *">
</div>
<input type="text" name="data[dianhua]" id="dr_dianhua" value="" placeholder="您的電話 *">
<input type="text" name="data[weixin]" id="dr_weixin" value="" placeholder="您的微信 *">
<input type="text" class="form-control" name="code" style="width:57%" placeholder="請(qǐng)輸入驗(yàn)證碼 *"><img align="absmiddle" style="cursor:pointer; height:37px; float:right;" onclick="this.src='/index.php?s=api&c=api&m=captcha&width=120&height=37&'+Math.random();" src="/index.php?s=api&c=api&m=captcha&width=120&height=37" />
<div id="submit" class="btn" onclick="dr_ajax_submit('http://localhost:89/index.php?s=form&c=zaixianyuyue&m=post', 'myform', '2000', 'index.php#yuyue')">立即預(yù)約</div>
</form>
看這個(gè)精簡(jiǎn)的吧,上面那個(gè)太多了
沒有發(fā)現(xiàn)問題,整個(gè)頁面就一個(gè)form嗎
恩,就這一個(gè)form,現(xiàn)在的問題就是如果手機(jī)版調(diào)用電腦版的表單代碼點(diǎn)擊提交就顯示“系統(tǒng)錯(cuò)誤”,如果把表單提交地址改成手機(jī)版綁定的域名然后把后臺(tái)的“跨站驗(yàn)證”關(guān)了就可以正常留言。
那不應(yīng)該會(huì)報(bào)錯(cuò),還是要把地址給我試一試
有沒有在不修改表單提交地址和關(guān)閉后臺(tái)跨站驗(yàn)證的情況下解決第一個(gè)那種問題呢?
地址給我看看
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
是本地環(huán)境,
電腦端代碼:<div id="submit" class="btn" onclick="dr_ajax_submit('http://localhost:88/index.php?s=form&c=zaixianyuyue&m=post', 'myform', '2000', 'index.php#yuyue')">立即預(yù)約</div>
移動(dòng)端代碼:<div id="submit" class="btn" onclick="dr_ajax_submit('http://localhost:89/index.php?s=form&c=zaixianyuyue&m=post', 'myform', '2000', 'index.php#yuyue')">立即預(yù)約</div>
回復(fù)迅睿框架創(chuàng)始人
再咨詢個(gè)小白問題,如果源碼上傳到服務(wù)器上,電腦端域名是www.yuming.com,移動(dòng)端域名是wap.yuming.com,到時(shí)候移動(dòng)端再向電腦端提交信息算是跨站嗎?
域名不同就算跨域了,你這個(gè)域名是不同的。
你把整個(gè)form標(biāo)簽體的代碼發(fā)了看看
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
<input name="is_form" type="hidden" value="1">
<input name="is_admin" type="hidden" value="0">
<input name="is_tips" type="hidden" value="">
<input name="csrf_test_name" type="hidden" value="de343a2dc4e7b899cb347f9b132e21d2">
<div class="inputColumns clearfix">
<div class="column2" style="width:100%">
<div class="columnInner">
<input type="text" name="data[xingming]" id="dr_xingming" value="" placeholder="您的姓名 *">
</div>
</div>
<div class="column2" style="width:100%">
<div class="columnInner">
<input type="text" name="data[dianhua]" id="dr_dianhua" value="" placeholder="您的電話 *">
</div>
</div>
<div class="column2" style="width:100%">
<div class="columnInner">
<input type="text" name="data[weixin]" id="dr_weixin" value="" placeholder="您的微信 *">
</div>
</div>
<div class="column2" style="width:100%">
<div class="columnInner">
<input type="text" class="form-control" name="code" style="width:57%" placeholder="請(qǐng)輸入驗(yàn)證碼 *"><img align="absmiddle" style="cursor:pointer; height:37px; float:right;" onclick="this.src='/index.php?s=api&c=api&m=captcha&width=120&height=37&'+Math.random();" src="/index.php?s=api&c=api&m=captcha&width=120&height=37" />
</div>
</div>
</div>
<div id="submit" class="btn" onclick="dr_ajax_submit('http://localhost:89/index.php?s=form&c=zaixianyuyue&m=post', 'myform', '2000', 'index.php#yuyue')">立即預(yù)約</div>
</form>
回復(fù)迅??蚣軇?chuàng)始人
看這個(gè)精簡(jiǎn)的吧,上面那個(gè)太多了
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
<input name="is_form" type="hidden" value="1">
<input name="is_admin" type="hidden" value="0">
<input name="is_tips" type="hidden" value="">
<input name="csrf_test_name" type="hidden" value="de343a2dc4e7b899cb347f9b132e21d2">
<input type="text" name="data[xingming]" id="dr_xingming" value="" placeholder="您的姓名 *">
<input type="text" name="data[dianhua]" id="dr_dianhua" value="" placeholder="您的電話 *">
<input type="text" name="data[weixin]" id="dr_weixin" value="" placeholder="您的微信 *">
<input type="text" class="form-control" name="code" style="width:57%" placeholder="請(qǐng)輸入驗(yàn)證碼 *"><img align="absmiddle" style="cursor:pointer; height:37px; float:right;" onclick="this.src='/index.php?s=api&c=api&m=captcha&width=120&height=37&'+Math.random();" src="/index.php?s=api&c=api&m=captcha&width=120&height=37" />
<div id="submit" class="btn" onclick="dr_ajax_submit('http://localhost:89/index.php?s=form&c=zaixianyuyue&m=post', 'myform', '2000', 'index.php#yuyue')">立即預(yù)約</div>
</form>
沒有發(fā)現(xiàn)問題,整個(gè)頁面就一個(gè)form嗎
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
恩,就這一個(gè)form,現(xiàn)在的問題就是如果手機(jī)版調(diào)用電腦版的表單代碼點(diǎn)擊提交就顯示“系統(tǒng)錯(cuò)誤”,如果把表單提交地址改成手機(jī)版綁定的域名然后把后臺(tái)的“跨站驗(yàn)證”關(guān)了就可以正常留言。
那不應(yīng)該會(huì)報(bào)錯(cuò),還是要把地址給我試一試
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!