易截截图软件、单文件、免安装、纯绿色、仅160KB

jquery php ajax

<!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> TEST </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<mce:script type="text/javascript" src="jquery-1.3.2.min.js" mce_src="menu/script/jquery-1.3.2.min.js"></mce:script>
<mce:script type="text/javascript"><!--
$(document).ready( function () {
$('#btn').click ( function () {
$.ajax({
url: '1.php',
type: 'POST',
data:'name='+$('#name').val(),
dataType: 'html',
timeout: 1000,
error: function(){
alert('Error loading XML document');
},
success: function(html){
if(html==""){
alert("Please input what you want to say~!");
}else{
$('#text').html(html);
}
}
});
});
})
// --></mce:script>
</head>
<body>
<input type="text" id="name" name="name" />
<input type="button" value="DO IT ." id="btn"/>
<hr />
<div id="text" style="color:red;" mce_style="color:red;"></div>
</body>
</html>

<?php
if(!isset($_POST['name']) || $_POST['name']=="" ) {
echo "";
} else {
echo "you say : ".$_POST['name'];
}
?>


相关文档:

php之XML转数组函数

<?
/**
* xml2array() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
* Arguments : $contents - The XML text
* $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the ......

php中如何关闭notice级的错误提示

php中如何关闭notice级的错误提示
2008-09-04 15:39
1.在php.ini文件中改动error_reporting
   改为:   
   error_reporting    =    E_ALL    &    ~E_NOTICE
如果你不能操作php.ini文件,你可以用下面的方法 ......

php 目录和文件操作

<?php
//新建目录
mkdir("/path/to/my/dir", 0700); //0700表示权限最大
//删除目录
rmdir("/path/to/my/dir");
//遍历目录
$p =dir(/etc/php5);
echo "handler:".$p->handler;
while(false!=$entry=$p->read()){
    echo $entry."\n" ;
}
$p->close();
//输出文件内容
$handle=@ ......

Linux 下php扩展 tidy 的安装 _ 参考

tidy 是一个非常帮忙的网页代码分析和纠错的工具,能够支持多种页面编码,并且支持xhtml输出。如果我们偷懒,甚至可以将整个页面缓存,最后采用tidy处理,最后输出完美的xhtml代码。
linux下安装过程如下:
首先安装tidy ,下载tidy源代码:
cvs -d:pserver: anonymous@tidy.cvs.sourceforge.net 为防备电子邮件地址收集 ......

linux 64bit _ php 添加 tidy 支持 _ 笔记

# 安装tidy
yum install tidy libtidy-devel
# 给php添加tidy模块
wget http://pecl.php.net/get/tidy-1.2.tgz
tar -xvzf tidy-1.2.tgz
cd tidy-1.2
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --libdir=/usr/lib64
make
make install
echo "extension="tidy.so"" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号