Home >Backend Development >PHP Tutorial >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>