`
x171306523c
  • 浏览: 17844 次
  • 性别: Icon_minigender_1
  • 来自: 沈阳
社区版块
存档分类
最新评论
文章列表

phpmailer群发邮件

    博客分类:
  • php
<?php require_once("class.phpmailer.php"); function smtp_mail ( $sendto_email, $subject, $body, $extra_hdrs, $user_name) { $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "mail.yourdomain.com"; //$mail->SMTPDebug = 2; $mail->SMTPAuth = ...
input高度固定,自动增宽   <input type="text" style="width:60;overflow-x:visible;overflow-y:visible;">       textarea 宽度固定,自动增高 方法一: <textarea rows=1 cols=40 style='overflow:scroll;overflow-y:hidden;;overflow-x:hidden' onfocus="window.activeobj=this;this.clock=setIn ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charse ...
 1.首先确认服务器出于安全的状态,也就是没有人能够任意地连接MySQL数据库。 可以采用将MySQL对外的端口封闭,并且停止Apache以及所有的用户进程的方法实现服务器的准安全状态。最安全的状态是到服务器的Console上面操作,并且拔掉网线。     2.修改MySQL的登录设置: # vi /etc/my.cnf   在[mysqld]的段中加上一句:skip-grant-tables   例如: [mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockskip-grant-tables  保存 ...
linux服务器下,nginx1.5+php的环境使用ci无法访问指定控制器,只能访问默认的控制器   解决方法:修改nginx配置文件。在server层里修改一下内容   location ~ .*\.(php|php5)         #有的是location ~ \.php$,有的是location ~ .*\.(php|php5)?$。根据具体情况而定,去掉?和$ { #fastcgi_pass  unix:/tmp/php-cgi.sock; fastcgi_pass  127.0.0.1:9000; fastcgi_index index.php; fast ...
<?php class runtime { var $StartTime = 0; var $StopTime = 0; function get_microtime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); } function start() { $this->StartTime = $ ...

php多语言选项实例

    博客分类:
  • php
目录结构www为根目录 www/js/language.js www/lang/Chinese.inc www/lang/English.inc www/lang/Korean.inc www/lib/function.php www/index.php     language.js function changeLanguage(obj) { var url = document.URL; var re = re = /[?&]language=[^&]*/; url = url.replace(re, "&quo ...

php时间戳积累总结

    博客分类:
  • php
日期转换成时间戳------------------------$catime = strtotime(“2012-04-05 12:30:09”); 时间戳转换成日期------------------------$catime2=date('Y-m-d H:i:s',$catime);     获得时间戳---------------------------------$date1=time();//输出1368669364 时间戳转换成日期-------------------------$date3=date('Y-m-d H:i:s',"1368669364&q ...
  <?php date_default_timezone_set("prc");//将时区设置为中国 $stringtime = date("Y-m-d H:i:s",time()); echo $stringtime."<br/>"; echo strtotime($stringtime)."<br/>"; echo date("Y/m/d G:i:s A",strtotime($stringtime)); echo "< ...
php.ini file_uploads = on                    # 是否允许通过HTTP上传文件的开关。默认为ON即是开 upload_tmp_dir =/tmp             # 文件上传至服务器上存储临时文件的地方,如果没指定就会用系统默认的临时文件夹 upload_max_filesize = 80M     # 允许上传文件大小的最大值。默认为2M或8M post_max_size = 160M            # 通过表单POST给PHP的所能接收的最大值,包括表单里的所有值。默认为8M 说明: 一般来说,设置好上述四个参数后,在 ...

php上传模块

 
仅仅一个文件,有比较完善的功能,有学习价值 index.php <?php header("content-Type: text/html; charset=gb2312"); $uptypes=array('image/jpg', //上传文件类型列表 'image/jpeg', 'image/png', 'image/pjpeg', 'image/gif', 'image/bmp', 'application/x-shockwave-flash', 'image/x-png', 'application/msword', ...
1、下载最新Nginx(至发布文章,nginx最新版本为1.4.0) 官方网站:http://nginx.org/   2、使用xftp上传下载的压缩包(nginx-1.4.0.tar.gz)到服务器的/home下   3、使用putty登陆服务器,进入/home目录并解压压缩包 cd /home tar zxvf nginx-1.4.0.tar.gz 得到文件夹nginx-1.4.0并进入到该文件夹里 cd nginx-1.4.0   4、执行./configure --user=www --group=www --prefix=/usr/local/nginx --w ...

PHP弹出确认框

    博客分类:
  • php
双选确认框,点击是跳转到yes.html,点击否跳转到no.html <?php echo "<script> if(confirm( '请选择跳转页面,是跳转到yes.html 否跳转到no.html? ')) location.href='yes.html';else location.href='no.html'; </script>"; ?>   双选确认框,选择后继续弹出确认对话框 <?php echo "<script> var sure=confirm( '确认你的 ...
PHP页面跳转一:header()函数 <?php header("Location: http://baidu.com"); exit(); ?>   PHP页面跳转二:meta标签 < meta http-equiv="refresh" content="1;url=http://baidu.com">   PHP页面跳转三:JavaScript <?php $url = "http://baidu.com"; echo "< s ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>PHP实现IP--数字互相转换</title> <meta http-equiv="Conte ...
Global site tag (gtag.js) - Google Analytics