Home > Backend Development > PHP Tutorial > FORM提交提示“需要进行省份验证”

FORM提交提示“需要进行省份验证”

WBOY
Release: 2016-06-06 20:30:50
Original
1105 people have browsed it

FORM提交提示“需要进行省份验证”

回复内容:

FORM提交提示“需要进行省份验证”

是否在 php 中构建了正确的表单了呢?


<code><?php $bucket = 'youbucket'; /// 空间名
  $form_api_secret = 'yourapisecret';
  $options = array();
  $options['bucket'] = $bucket; /// 空间名
  $options['expiration'] = time()+600; /// 授权过期时间
  $options['save-key'] = '/{filename}{.suffix}';
  $policy = base64_encode(json_encode($options));
  $sign = md5($policy.'&'.$form_api_secret); 
?>


<form action="http://v0.api.upyun.com/<?php%20echo%20%24bucket?>/" method="post" enctype="Multipart/form-data">
    <input type="hidden" name="policy" value="<?php echo $policy?>">
    <input type="hidden" name="signature" value="<?php echo $sign?>">
    <input type="file" name="file">
    <input type="submit">
</form>



</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template