所有由咪咪猪发布的文章

IIS7.5/PHPv5.3.24 DiscuzX2.5上传文件出现Upload Error: 500的解决方法

添加了临时目录,重启IIS服务器后终于解决了。

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
upload_tmp_dir =C:\phpfileuploadtmp

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 24M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

php Unicode 转换 ASCII


<?php 
$str = '我';

/* 将'我' 转换成'25105' 或'&#25105;' */ 
// 使用iconv 
$unicode_html = base_convert(bin2hex(iconv('UTF-8', 'UCS-4', $str)), 16, 10); // 25105

//使用mb_convert_encoding 
$unicode_html = base_convert(bin2hex(mb_convert_encoding($str, 'ucs-4', 'utf-8')), 16, 10); // 25105

// 补上&#xxxxx; 
$unicode_html = '&#' . base_convert(bin2hex(iconv("utf-8", "ucs-4", $str)), 16, 10) . ';'; // &#25105;

// 将&#25105 转回'我' 
$str = mb_convert_encoding($unicode_html, 'UTF-8', 'HTML-ENTITIES'); // '我', $unicode_html = '&#25105' 
?>

Uncaught TypeError: Property ‘submit’ of object # is not a function

今天晚上遇到一个很纠结的问题,在提交表单是遇到如下错误信息:

Uncaught TypeError: Property 'submit' of object # is not a function

html代码如下:

<button type="submit" value="true" class="pn pnc" name="submit"><strong>提交申请</strong></button>

网上搜了下,出现这个错误的原因是:type写了button,name写了submit,把name改成button或其它就正常了