yaron's space

以技术为主

RSS订阅

  • 首页
  • LAMP与网站架构
  • Linux编程
  • 分布式数据存储
  • 编程语言与算法设计
  • 虚拟化技术KVM
  • 关于我
  • 订阅

PHP $_FILES详细说明

四 22nd

由admin发表在Php|Python | 144 浏览

没有评论

$_FILES数组内容如下:

$_FILES['myFile']['name']   客户端文件的原名称。
$_FILES['myFile']['type']   文件的 MIME 类型,需要浏览器提供该信息的支持,例如”image/gif”。
$_FILES['myFile']['size']   已上传文件的大小,单位为字节。
$_FILES['myFile']['tmp_name']   文件被上传后在服务端储存的临时文件名,一般是系统默认。可以在php.ini的upload_tmp_dir 指定,但 用 putenv() 函数设置是不起作用的。
$_FILES['myFile']['error']   和该文件上传相关的错误代码。['error'] 是在 PHP 4.2.0 版本中增加的。下面是它的说明:(它们在PHP3.0以后成了常量)
UPLOAD_ERR_OK
值:0; 没有错误发生,文件上传成功。
UPLOAD_ERR_INI_SIZE
值:1; 上传的文件超过了 php.ini 中 upload_max_filesize 选项限制的值。
UPLOAD_ERR_FORM_SIZE
值:2; 上传文件的大小超过了 HTML 表单中 MAX_FILE_SIZE 选项指定的值。
UPLOAD_ERR_PARTIAL
值:3; 文件只有部分被上传。
UPLOAD_ERR_NO_FILE
值:4; 没有文件被上传。
值:5; 上传文件大小为0.

本文地址:http://www.yaronspace.cn/blog/index.php/archives/558

$_FILES, php

[转载]Linux系统下超强远程同步备份工具Rsync使用详解

四 17th

由admin发表在Linux编程 | 346 浏览

没有评论

服务器之 间常常要保持些文件或目录的一致,比如一些大的软件下载网站,它们通常使用多台服务器来提供下载服务。当一台服务器上的文件更新后,其它的服务器也需要更 新,而且 在更新的时候应该是只对新增或是修改过的文件进行更新,否则会造成网络带宽和时间的浪费。rsync就是能有效的保持文件及目录的一致的优秀软件。
rsync,remote synchronize
顾名思意就知道它是一款实现远程同步功能的软件,它在同步文件的同时,可以保持原来文件的权限、时间、软硬链接等附加信息,而且可以通过ssh方式来传输文件,这样其保密性也非常好,另外它还是免费的软件。rysnc的官方网站:::URL::http://rsync.samba.org/,可以从上面得到最新的版本。当然,因为rsync是一款如此有用的软件,所以很多Linux的发行版本都将它收录在内了。你的Linux里并没有安装rsync,你可以按以下的安法自行安装: 更多 >

Linux编程, rsync, 远程同步

介绍Nutch两篇入门文章

四 13th

由admin发表在Java | 77 浏览

没有评论

http://today.java.net/pub/a/today/2006/01/10/introduction-to-nutch-1.html

http://today.java.net/pub/a/today/2006/02/16/introduction-to-nutch-2.html

很不错的入门文章

本文地址:http://www.yaronspace.cn/blog/index.php/archives/552

Java, nutch

Eclipse启动失败–jvm terminated Exit code=-1 解决方法

四 12th

由admin发表在Java | 527 浏览

没有评论

第一种:

只需要删除eclipse.ini中的
–launcher.XXMaxPermSize
256M

第二种:将eclipse.ini的内容全删了(我用这种方法解决的)

本文地址:http://www.yaronspace.cn/blog/index.php/archives/548

eclipse, eclipse.ini

windows下好用的代码对比软件beyond compare

四 11th

由admin发表在业界趣闻轶事 | 269 浏览

没有评论

linux 下用diff

windows下beyond compare 3 很强大

本文地址:http://www.yaronspace.cn/blog/index.php/archives/545

diff, windows, 代码比较

如何解决js跨域问题

四 11th

由admin发表在前端技术相关 | 1,569 浏览

没有评论

Js跨域问题是web开发人员最常碰到的一个问题之一。所谓js跨域问题,是指在一个域下的页面中通过js访问另一个不同域下的数据对象,出于安全性考 虑,几乎所有浏览器都不允许这种跨域访问,这就导致在一些ajax应用中,使用跨域的web service会成为一个问题。 解决js跨域问题,目前在客户端和服务端都有一些现成的解决方案,但这些方案并不能解决所有问题。下面我们先来看下有哪些常用的解决方案,并针对空间产品 对跨域问题的需求给出一个space自己的解决方案,希望能对其他产品组有借鉴意义。

客户端解决方案

如何在客户端解决js跨域问题几乎是所有web开发人员会首先考虑的。目前最常用的方法有2种:设置document.domain、通过script 标签加载。

设置document.domain

采用这种方法的前提是跨域请求涉及的两个页面必须属于一个基础域(例如都是xxx.com,或是xxx.com.cn),使用同一协议(例如都是 http)和同一端口(例如都是80)。例如,aaa.xxx.com里面的一个页面需要调用bbb.xxx.com里的一个对象,则将两个页面的 document.domain都设置为xxx.com,就可以实现跨域调用了。 另外,需要注意的是,这种方式只能用在父、子页面之中,即只有在用iframe进行数据访问时才有用。 更多 >

ajax, 前端技术相关, 跨域

php中错误处理的函数集

四 8th

由admin发表在Php|Python | 18 浏览

没有评论

  • debug_backtrace — Generates a backtrace
  • debug_print_backtrace — Prints a backtrace
  • error_get_last — Get the last occurred error
  • error_log — Send an error message somewhere
  • error_reporting — Sets which PHP errors are reported
  • restore_error_handler — Restores the previous error handler function
  • restore_exception_handler — Restores the previously defined exception handler function
  • set_error_handler — Sets a user-defined error handler function
  • set_exception_handler — Sets a user-defined exception handler function
  • trigger_error — Generates a user-level error/warning/notice message
  • user_error — Alias of trigger_error

本文地址:http://www.yaronspace.cn/blog/index.php/archives/540

php, 错误处理

php中error_log的用法

四 8th

由admin发表在Php|Python | 123 浏览

没有评论

Description

bool error_log ( string $message [, int $message_type = 0 [, string $destination [, string $extra_headers ]]] )

Sends an error message to the web server’s error log, a TCP port or to a file.

Parameters

message
The error message that should be logged.

message_type
Says where the error should go. The possible message types are as follows

error_log() log types
0
message is sent to PHP’s system logger, using the Operating System’s system logging mechanism or a file, depending on what the error_log configuration directive is set to. This is the default option.
1 message is sent by email to the address in the destination parameter. This is the only message type where the fourth parameter, extra_headers is used.
2 No longer an option.
3 message is appended to the file destination. A newline is not automatically added to the end of the message string.
4 message is sent directly to the SAPI logging handler.
destination
The destination. Its meaning depends on the message_type parameter as described above.

extra_headers
The extra headers. It’s used when the message_type parameter is set to 1. This message type uses the same internal function as mail() does.

打印日志用的

examples:

error_log("Oracle database not available!", 0);

error_log("Big trouble, we're all out of FOOs!", 1,"operator@example.com");

error_log("You messed up!", 3, "/var/tmp/my-errors.log");

本文地址:http://www.yaronspace.cn/blog/index.php/archives/538

error_log, php

php中trigger_error()的用法

四 8th

由admin发表在Php|Python | 156 浏览

没有评论

Description

bool trigger_error ( string $error_msg [, int $error_type = E_USER_NOTICE ] )

Used to trigger a user error condition, it can be used by in conjunction with the built-in error handler, or with a user defined function that has been set as the new error handler (set_error_handler()).

This function is useful when you need to generate a particular response to an exception at runtime.

Parameters

error_msg
The designated error message for this error. It’s limited to 1024 characters in length. Any additional characters beyond 1024 will be truncated.

error_type
The designated error type for this error. It only works with the E_USER family of constants, and will default to E_USER_NOTICE.

有三种错误类型 E_USER_NOTICE          E_USER_WARNING         E_USER_ERROR

注意 E_USER_ERROR这种类型的错误会直接终止php程序的执行

本文地址:http://www.yaronspace.cn/blog/index.php/archives/534

php, trigger_error

cvs update: move away ; it is in the way[解决方法]

四 6th

由admin发表在Linux编程 | 594 浏览

没有评论

If you encounter this issue, please just delete your local files or folders first   (rm命令即可)

then update it again.

the issue will be fixed.

不用担心文件被永久删除

本文地址:http://www.yaronspace.cn/blog/index.php/archives/532

cvs
« 第一页...10«1819202122»30...最后一页 »
  • 分类目录

    • Java (49)
    • LAMP与网站架构 (56)
      • Mysql (7)
      • Php|Python (32)
      • WebServer (3)
    • Linux编程 (84)
    • project (5)
    • Project Management (15)
    • Test (8)
    • web-service (4)
    • wordpress (13)
    • Work Smartly (3)
    • 业界趣闻轶事 (43)
    • 分布式数据存储 (12)
    • 前端技术相关 (34)
    • 开源软件 (13)
    • 生活感悟 (11)
    • 编程语言与算法设计 (65)
    • 虚拟化技术KVM (12)
    • 面试题 (3)
  • 标签

    AC自动机 ajax algorithm c++ cmd dom4j dtree eclipse email firefox gdb gzip Java jquery js kfs kvm Linux编程 map Mysql php redis replace rest sheepdog shell stl string struts struts2 substring vim WebServer wordpress xml xpath 优化 前端技术相关 动态库 命令 弹出窗口 技巧 插件 源码分析 调试
  • 最近半年热门文章

    • vim使用技巧小结【继续更新】
    • gdb调试程序之监控内存【七】
    • 模板成员函数为什么不能是虚函数
    • 2011年xiao结
    • 2011年的最后一天
    • 使用 cron、bash 和 wget 监控 Web 服务器...
    • 水木ip显示地址的firefox插件推荐
    • 定时备份网站代码与数据的shell工具
    • 在Debian下安装Systemtap方法
  • 最近文章

    • 定时备份网站代码与数据的shell工具
    • 使用 cron、bash 和 wget 监控 Web 服务器的状态[转载]
    • 水木ip显示地址的firefox插件推荐
    • 在Debian下安装Systemtap方法
    • 2011年xiao结
    • 模板成员函数为什么不能是虚函数
    • gdb调试程序之监控内存【七】
    • 2011年的最后一天
    • vim使用技巧小结【继续更新】
    • 积攒人品
  • 近期评论

    • 晓晓 在 关于我 上的评论
    • jiazhoulvke 在 vim编辑多个文件的方法 上的评论
    • xh 在 关于我 上的评论
    • 钕铁硼磁铁厂家 在 一年又一年 上的评论
    • 钕铁硼磁铁厂家 在 yaronli排名还不错 上的评论
    • figo 在 【编程之美】单链表是否存在环以及环入口的位置【转载】 上的评论
    • 徐超 在 关于我 上的评论
    • 赫 在 KVM虚拟机在物理机间的迁移方法 上的评论
  • 文章存档

    • 2012 年四月 (1)
    • 2012 年三月 (5)
    • 2012 年二月 (1)
    • 2011 年十二月 (2)
    • 2011 年十一月 (1)
    • 2011 年十月 (3)
    • 2011 年九月 (1)
    • 2011 年八月 (4)
    • 2011 年七月 (5)
    • 2011 年六月 (3)
    • 2011 年五月 (5)
    • 2011 年四月 (7)
    • 2011 年三月 (12)
    • 2011 年二月 (10)
    • 2011 年一月 (6)
    • 2010 年十二月 (12)
    • 2010 年十一月 (18)
    • 2010 年十月 (15)
    • 2010 年九月 (16)
    • 2010 年八月 (14)
    • 2010 年七月 (10)
    • 2010 年六月 (20)
    • 2010 年五月 (15)
    • 2010 年四月 (15)
    • 2010 年三月 (23)
    • 2010 年二月 (12)
    • 2010 年一月 (21)
    • 2009 年十二月 (42)
    • 2009 年十一月 (55)
    • 2009 年十月 (16)
  • LAMP技术

    • kpumuk.info
    • php.net
    • php5研究
    • w3school.com
    • wordpress code
    • 国外的博客
  • 博客链接

    • 小芳邓的博客
    • 晓琳的技术博客
    • 董的博客
    • 靖难|魔都小码农
    • 韩晓的博客
    • 飞飞的博客
  • 开源站点

    • Thrift开源RPC框架协议
    • TIPI深入理解PHP内核
    • 开源中国社区
    • 淘宝开源平台
    • 端口映射工具portmap
  • 链接表

    • ChinaItLab
    • developerWorks 中国
    • Linux下C语言参考手册
    • 团购搜索-团一团
    • 律师咨询
  • 用户登录






    • 注册
    • 忘记你的密码?
版权所有 © 2009-2012 yaron's space| 备案/许可证编号为: 京ICP备09103585号
RSS订阅 1 顶端