function upfile($filename,$type,$path)
{
$tempfile=$_files[$filename];//接收上传的临时文件
function upfile($filename,$type,$path)
{
$tempfile=$_files[$filename];//接收上传的临时文件
$allow_url_override = 1; // set to 0 to not allow changed via post or get
if(!$allow_url_override || !isset($file_to_include))
{
$file_to_include = "phprm.com.xls";
}
if(!$allow_url_override || !isset($max_rows))
{
$max_rows = 0; //use 0 for no max
}
if(!$allow_url_override || !isset($max_cols))
{
$max_cols = 5; //use 0 for no max
}
if(!$allow_url_override || !isset($debug))
{
$debug = 0; //1 for on 0 for off
}
if(!$allow_url_override || !isset($force_nobr))
{
$force_nobr = 1; //force the info in cells not to wrap unless stated explicitly (newline)
}
//survey.php
<?
//###########################################################
//
// for questions and comments
// roland (alias -=: vlieg :=-)
// icq #78354631
// mail: vlieg@atoomnet.net
//
// nb: this script won't work on free hosting pages, because of the secure mode!
// nb: you must have registered your icq# at http://web.icq.com/sms/login/ in order for this script to work
//###########################################################
conn.php文件
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script >
var xmlhttp
function showhint(str)
{
if (str.length==0)
{
document.getelementbyid("txthint").innerhtml=""
return
}
xmlhttp=getxmlhttpobject()
if (xmlhttp==null)
{
alert ("browser does not support http request")
return
}
xmlhttp.onreadystatechange=statechanged
$file="./www.phprm.com/file.cache";
$array = array("count" => "3000", "num" =>"300");
//缓存
mysql教程_connect('localhost','root','root');
mysql_select_db('abc');
mysql_query("set names 'gbk'");
$sql = "select a.itemid,a.lastpost,a.city,b.thumbpath from supe_spaceitems a left join supe_attachments b on a.itemid = b.itemid where a.picid>0 order by a.itemid desc limit 0,3";
$query = mysql_query( $sql );
while( $k = mysql_fetch_array( $query ) )
{
$str .= "<a href='/a/'".date("ymd",$k['lastpost']).'/v-'.$k['itemid'].".html><img src=".$url.'/attachments/'.$k['thumbpath']." /></a>";
}
//搜索csv中指定内容
$fh = @fopen("csv_file_name", "r");
if($fh) {
if(flock($fh, lock_ex)) {
while(!feof($fh)) {
$line = fgets($fh);
if(strstr($line, $target_email_address) !== false) {
$data = split(",", $line); // $data *is* an array
}
}
flock($fh, lock_un);
}
首先我们来创建搜索数据表
create table if not exists `search` (
`id` int(4) not null auto_increment,
`keyword` varchar(500) not null,
primary key (`id`)
) engine=myisam default charset=utf8 auto_increment=1 ;
非常简单的日历类
date_default_timezone_set("etc/gmt-8");
//显示目录所有目录
/*
结果
fread语法:
string fread ( resource $handle , int $length )
fread()读取到的字节长度由处理引用的文件指针。读尽快停止对符合下列条件之一: