【崩溃了,谁帮忙把一个java和c#的程序改成php的,谢谢】教程文章相关的互联网学习教程文章

php的计数器程序

1)文本计数器<?php$countfile="/count.txt"; //设置保存数据的文件if (!file_exists($countfile)){//判断文件是否存在exec( "echo 0 > $countfile");} $fp = fopen($countfile,"rw"); $length=filesize($countfile);$num = fgets($fp,$length); $num += 1; exec( "rm -rf $countfile");exec( "echo $num > $countfile");print "访问量总计:"."$num"."人次"; //显示访问次数?>2)图形计数器<?$countfile="/count-num.txt"; //设...

PHP的栏目导航程序

<?php$d_label=array("service"=>"有偿服务","teach"=>"家教中心","union"=>"校园服务联盟","job"=>"学生兼职","free"=>"信息库");$directory=$REQUEST_URI;while($directory!="/"){ $d_text=basename($directory); if(isset($d_label[$d_text])){$d_text=$d_label[$d_text];} $d_link=$directory; $d_curx="-><a href=\"$d_link\">$d_text</a>"; $d_komplettx=$d_curx.$d_komplettx; $directory=dirname($directory);} ech...

PHP系统流量分析的程序

>create table stream (ip text,sTime int,visits int,info text);<?if($day<0)$day=0;$mlink=mysql_connect('localhost','ajax','xxxxxxx');//统计至今首页被浏览的总次数$query="select SUM(visits) as tvisits from stream";$result=mysql_db_query('ajax',$query,$mlink);echo '<span class="st1">浏览首页总累积次数:';if($row=mysql_fetch_object($result)){echo $row->tvisits;}$week=array("星期日","星期一","星期二","星...

用php写的serv-u的web申请账号的程序

<?//Sign.php//系统适用于win2000$path="e:\\serv-u\\ServUDaemon.ini";//用户文件的路径$fabu="e:\\web\\";//总web路径if($add){$fp1=fopen($path,"r+");$str=fread($fp1, filesize($path));$fp=fopen($path,"a");flock($fp,3);$us="=".$userid;$start=strpos($str,$us);if($start) {echo "对不起,该用户已经存在"; }else{$start1=strpos($str,"User1");if($start1){$start=$start1+6;$end=strpos($str,"|",$start);$first...

无数据库的详细域名查询程序PHP版(4)

文件十一:searchform.tml <FORM METHOD="POST" ACTION="[>SCRIPT_NAME<]"> <INPUT NAME="domain" SIZE=25 MAXLENGTH=57></td><td valign=top> [>EXT_HTML_LIST<] </td></tr><tr><td valign=top colspan="2"> <input type="submit" value="Search"> <input type="reset" value="Clear"> </FORM> 文件十二:searchmain.tml <p>欢迎使用本站提供的域名查询程序。<p>请输入您想查询的域名并选择其扩展域名(例如 ".com",".net", ".org"...

无数据库的详细域名查询程序PHP版(5)

文件十四:wizardres.tml <p>下面结果来自域名注册向导, 这些结果从<i>[>WHOIS_SERVER<]</i>获得, 点击订购可以申请的域名,你也可以查看谁注册了那些域名。<a href="[>SCRIPT_NAME<]?do_wizard=1">单击这里</a> 返回域名注册向导。<p> <center> <table border=0 width="100%"> <tr> <td width="50%" align="center"> <font face="" size=""> <b>下面域名不可以申请:</B> </font> </td><td width="50%" align="center"> <font fa...

模拟OICQ的实现思路和核心程序(二)

3 在线用户的信息扫描和更新在网页中使用内置框架来调用扫描和更新程序,这行也能在网页源代码里面看到!<iframe name=flush src="userflush.php" width="0" height="0" frameborder="0" scrolling="NO" marginwidth="0" marginheight="0" hspace="0" vspace="0"></iframe>4 信息扫描和更新程序 userflush.php<? session_start();mysql_connect("localhost","","");mysql_select_db("php2000");$delaytime=0;// 查找新的发言$query...

模拟OICQ的实现思路和核心程序(一)

根据许多网友需求,特地把我站的这个模拟 OICQ 的在线聊天的东西献给大家!1 用户必须注册登陆,在数据库 userinfo 里面保存如下几个字段Name 不用问了,这是登陆用的用户名,必须唯一Password 登陆密码NickName 用户昵称,也就是显示的名字Face 存放着用户头像的编号,比如 01,代表 /images/face/01.gif 头像文件OnlineStatus 用户是否在线的标志,在用户登陆的时候设置为 1CurrentDate 用户最后访问/更新的时间,用于判断用户是...

模拟OICQ的实现思路和核心程序(三)

5 聊天信息的发送、阅读和回复程序 - shortalk.php<?require("require.php"); // 判断用户是否合法在线的公用程序?><html><head><title>短信息</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">td {font-size:9pt}</style><script language="Javascript"><!--function docheck() {if (document.sendmsg.replymessage.value=="") {alert("缺少内容:需要输入您的留言内容");do...

如何对PHP程序中的常见漏洞进行攻击(下)

如何对PHP程序中的常见漏洞进行攻击(下) 翻译:analysist(分析家) 来源:http://www.china4lert.org 如何对PHP程序中的常见漏洞进行攻击(下) 原著:Shaun Clowes <http://www.securereality.com.au/> 翻译:analysist <http://www.nsfocus.com/> [库文件] 正如我们前面讨论的那样,include()和require()主要是为了支持代码库,因为我们一般是把一些经常使用的函数放到一个独立的文件中,这个独立的文件就是代码库,当需要使用...

一个程序下载的管理程序(一)

该程序的一些功能有几点: 1:完整的搜索引擎 2:三种排序对象.(加入时间,下载次数,程序名字).及两种排序方法(倒序,顺序). 3:管理员随时修改. 4:报告链接错误.供管理员随时修正. 5:分页功能. 创建表: CREATE TABLE download ( author varchar(15), title varchar(30), url varchar(200), say text, ttime datetime, click bigint(20), id bigint(20) NOT NULL auto_increment, type tinyint(3) unsigned DEFA...

一个程序下载的管理程序(三)

//后台程序sign.php源代码如下:<?require("../opendata.php");?> <? if($action=="sign") { if($say==""||$title==""||$url==""||$size=="") { header("location:../message.php?message=资料不完整&redirect=download/download.php?page=0%26action=publish"); break; } $say=htmlspecialchars($say); $title=htmlspecialchars($title); $say=str_replace(" ","&nbsp",$say); $say=nl2br($say); ...

一个程序下载的管理程序(二)

//主程序download.php源代码如下:<?session_start();?> <html> <head> <meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>穷人网软件联盟</title> <script language="javascript"> function popwin(parm) { window.op...

无数据库的详细域名查询程序PHP版(1)

文件一:index.php <?php echo "<!-- Powered by MWhois written by Matt Wilson <matt@mattsscripts.co.uk> -->\\n\"; /* ######################################################################################### # # # 本域名查询系统由mydowns收集整理汉化,汉化归把握时间网站所有(http://www.85time.com) # ...

一个程序下载的管理程序(四)

//管理程序chang.php源代码如下:<? session_start() ?> <? if($session_power==""||$session_power<1) { header("location: ../message.php?redirect=default.php&message=你不是理员"); break; }?> <?require ("../opendata.php");?> <? if($step=="1") { if(!($rs=mysql_fetch_array(mysql_query("select * from download where id=".$id."",$cn)))) echo "提取资料出错"; else { ?> <html> <head> <title>修改资料</title> ...