php文件上传
//上传文件
$dir="../upfile/jianli";
set_time_limit(0);
extract($_FILES);
if(!empty($res_clett["name"])){
$upfile=&$HTTP_POST_FILES['con_pdf'];
$upfileEx=substr($upfile['name'],-3);
$tmp_name=date("YmdGhis").'.'.$upfileEx;
$pic=$dir."/".$tmp_name;//上传目录+用时间当文件名+后缀
$upTemp=move_uploaded_file($upfile['tmp_name'],$pic);
chmod($pic, 0755);//设定上传的文件的属性,使用linux权限标记
if ($upTemp){
//上传成功
}else{
//上传失败
}
}
相关文档:
有这么一段HTML,比较不规则的,如果要提取其中的链接地址和链接名称,怎么弄? 内容来自dedecms
//HTML
$str = '<a id="top8" href="http://list.mp3.baidu.com/song/A.htm?top8" class="p14" target="_top">歌曲列表</a><br><a target="_blank" id="bp" href="http://list.mp3.baidu.com/list/ba ......
“守望轩”博客右侧边栏原来有个“杂感”的栏目,用来记录短的、不能大篇幅成文的短句,或者自己比较喜欢的短句和言论。
这个栏目最开始调用微博饭否的API来做的,因为众所周知的缘故,饭否无法使用了,后来采用腾讯的滔滔API来实现.2010年1月26日滔滔业务将会开始和QQ空间心情整合,只能考虑放弃。 ......
http://fw.qq.com/ipaddress返回类似:var IPData = new Array("61.51.71.183","","北京市","");
<?php
function get_ip_place(){
$ip=file_get_contents(http://fw.qq.com/ipaddress);
$ip=str_replace('"',' ',$ip);
$ip2=explode("(",$ip);
$a=substr($ip2[1],0,-2);
$b=explode(",",$a);
return&n ......
一、如何选择 PHP5.3 的 VC9 版本和 VC6 版本
VC6 版本是使用 Visual Studio 6 编译器编译的,如果你的 PHP 是用 Apache 来架设的,那你就选择 VC6 版本。
VC9 版本是使用 Visual Studio 2008 编译器编译的,如果你的 PHP 是用 IIS 来架设的,那你就选择 VC9 版本。
二、如何选择 PHP5.3 的 Thread Safe 和 Non Thread S ......