<?php 
    echo '您好:欢迎使用HTML_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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="server.php?client=all"></script>
<script type="text/javascript">
function replace(){
   HTML_AJAX.replace('Hello','Hello.php');
}
</script>
</head>
<body>
<div id="Hello">此处将被替换</div>
<input type="button"  onclick="replace();" value="点击此处进行替换" />
</body>
</html>=====================================================================================
如果没有人工将PEAR内HTML这个文件夹复制到这个文件目录下,就无法运行成功,就是简单的提示找不到该路径下的SERVER.PHP文件,问题在1楼说的比较清楚了,大家帮看看,谢谢。

解决方案 »

  1.   

    include 'HTML/AJAX/Server.php';
    当使用这样的方式引用文件时,必须将HTML目录置于当前目录下,或在php.ini中指定搜索路径(include_path)
      

  2.   

    恩,谢谢LS的回答,我把HTML目录放到当前目录已成功,安装的时候也重新设置过php.ini里的include_path路径,我把它指向了PHP安装目录下的PEAR目录,这样应该没错吧,还是不行,显示错误:
    Warning: include(HTML/AJAX/Server.php) [function.include]: failed to open stream: No such file or directory in D:\www\test\Server.php on line 3Warning: include() [function.include]: Failed opening 'HTML/AJAX/Server.php' for inclusion (include_path='.;C:\php5\pear') in D:\www\test\Server.php on line 3
    ==================================================================
    不知道为什么还会显示这错误,php.ini文件我已经改成PHP安装目录的PEAR文件夹了,怎么这里还是显示for inclusion (include_path='.;C:\php5\pear')············哎呀哎呀···
      

  3.   

    ·双线主机 100M/35元/年,免费送数据库(自选MY/MSSQL)
    ·支持ASP+ASP.NET+PHP+HTML
    ·详情请访问:http://www.515dns.com
    ·QQ:287895593