[转载声明] 转载时必须标注:本文来源于铁木箱子的博客http://www.mzone.cc [本文地址] 本文永久地址是:http://www.mzone.cc/article/317.html 因为需要经常备份网站的数据,所以了解并学习了下linux下如何通过shell来发送邮件,这里以CentOS为例,使用mail命令来进行外部邮件的发送。mail命令的语法如下: Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr … [-- sendmail-options ...] mail [-iInNv] -f [name] mail [-iInNv] [-u user] 使用mail命令发送邮件,有如下三种方式: 1、直接使用shell当编辑器 mail -s “Hello from mzone.cc by shell” admin@mzone.cc hello,this is the …
CentOS yum时出现”Could not retrieve mirrorlist”的解决办法
CentOS yum时出现“Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error ”错误:[root@server mysql-5.0.56]# yum install gcc Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was [Errno 4] IOError: Error: Cannot find a valid baseurl for repo: addons …
50个必备的实用jQuery代码段
本文会给你们展示50个jquery代码片段,这些代码能够给你的javascript项目提供帮助。其中的一些代码段是从jQuery1.4.2才开始支持的做法,另一些则是真正有用的函数或方法,他们能够帮助你又快又好地把事情完成。如果你发现你任何可以做得更好的地方的话,欢迎把你的版本粘贴在评论中! 1. 如何修改jQuery默认编码(例如默认UTF-8改成改GB2312): $.ajaxSetup({ ajaxSettings:{ contentType:”application/x-www-form-urlencoded;chartset=GB2312″} }); 2. 解决jQuery, prototype共存,$全局变量冲突问题: <script src=”prototype.js”></script> <script src=”http://blogbeta.blueidea.com/jquery.js”></script> <script type=”text/javascript”> jQuery.noConflict(); </script> 注意:一定要先引入prototype.js 再引入jquery.js,先后顺序不可错。 3. jQuery 判断元素上是否绑定了事件 //jQuery event封装支持判断元素上是否绑定了事件,此方法只适用于jQuery绑定的事件 var $events = $(“#foo”).data(“events”); if( $events && $events["click"] ){ //your code } 4. 如何使用jQuery来切换样式表 //找出你希望切换的媒体类型(media-type),然后把href设置成新的样式表。 …
js获取某月天数
php获取当前时间的前几个月份
mysql log_bin_trust_function_creators
在数据库存添加function时,出现以下错误: #1418 – This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) 在要执行的SQL前加入:SET GLOBAL log_bin_trust_function_creators = 1;即可顺利导入function
近期评论