很多站长朋友们都不太清楚phpchr13,今天小编就来给大家整理phpchr13,希望对各位有所帮助,具体内容如下:
本文目录一览: 1、 VB中的chr(13) 和chr(10)是什么意思 2、 用PHP制作动态数字时钟 在线等 3、 php网页病毒清除的方法 4、 php中,空格替换成换行符,怎么实现? VB中的chr(13) 和chr(10)是什么意思Chr(10):ASCII码中的换行键,相当于vbLF。
Chr(13):ASCII码中的回车键,相当于vbCR。
1、在窗体输出中:
Chr(13) 、 Chr(10) 、 Chr(13)+Chr(10) 是换一行;
Chr(10)+Chr(13)、两个Chr(13)、两个Chr(10) 是换两行。
2.、在Text输出中:
只有Chr(13)+Chr(10)可换一行,其余无换行。(换行的前提是Text控件的Multiline属性设置为True)
用PHP制作动态数字时钟 在线等第一个:
<?php
$n=chr(13);
echo "<SCRIPT LANGUAGE=\"JavaScript\">".$n;
echo "document.write('<div id=\"TimeShow\" align=\"center\" style=\"MARGIN-right:0px;font-size:9pt;font-family:宋体\">?</div>');".$n;
echo "var y=".date("Y")."; //年 ".$n;
echo "var m=".date("n")."; //月 ".$n;
echo "var d=".date("j")."; //日 ".$n;
echo "var w=".date("w")."; //星 ".$n;
echo "var h=".date("H")."; //时 ".$n;
echo "var i=".date("i")."; //分 ".$n;
echo "var s=".date("s")."; //秒 ".$n;
echo "var hstr=istr=sstr=a='';".$n;
echo "var ww = Array('日','一','二','三','四','五','六');".$n;
echo "function clock(){".$n;
echo " s++;".$n;
echo " if (s==60) {i+=1;s=0;}//秒进位".$n;
echo " if (i==60) {h+=1;i=0;}//分进位".$n;
echo " if (h==24) {w+=1;d+=1;h=0;}//时进位".$n;
echo " if (w==7) {w=0;}//星期进位".$n;
echo " if (m==2) { //是否是二月份?".$n;
echo " if (!y%4>0) { //不是闰月(二月有28天)".$n;
echo " if (d==30){".$n;
echo " m+=1;".$n;
echo " d=1;}".$n;
echo " }".$n;
echo " else { //是闰月(二月有29天)".$n;
echo " if (d==29){".$n;
echo " m+=1;".$n;
echo " d=1;}".$n;
echo " }".$n;
echo " }".$n;
echo " else { //非2月份的月份".$n;
echo " if (m==4 || m==6 || m==9 || m==11) { //只有30天的月份".$n;
echo " if (d==31) {".$n;
echo " m+=1;".$n;
echo " d=1;}".$n;
echo " }".$n;
echo " else { //有31天的月份".$n;
echo " if (d==32){".$n;
echo " m+=1;".$n;
echo " d=1;}".$n;
echo " }".$n;
echo " }".$n;
echo " if (m==13) {y+=1;m=1;}//月进位".$n;
echo " if (h < 10) {hstr=' 0'+h} else {hstr=' '+h};".$n;
echo " if (i < 10) {istr=':0'+i} else {istr=':'+i};".$n;
echo " if (s < 10) {sstr=':0'+s} else {sstr=':'+s};".$n;
echo " if (h < 13) {astr=' 上午';} else {astr=' 下午';};".$n;
echo " TimeShow.innerHTML=y+'年'+m+'月'+d+'日 '+'<font color=blue>星期'+ww[w]+'</font>'+hstr+istr+sstr+astr;".$n;
echo " setTimeout('clock()',1000);".$n;
echo "}".$n;
echo "clock();".$n;
echo "</SCRIPT>".$n;
?>
php网页病毒清除的方法php网页病毒清除的方法
很多人的网页经常被无故的在php,asp,html,js 等文件后台加上一些木马地址,造成了很大的困扰,你知道要怎么清除php网页病毒吗?下面是我整理的一些关于php网页病毒清除的.方法的相关资料,供你参考。
php网页病毒清除的方法:
首先们要读取 $checkFile 文件这个文章是判断一个文章 是否被感染了,如果是就会执行$savafile变量里面的txt文件路径的所有文件,进行按你infecFile病毒列表清除一次.
复制代码 代码如下:
Class clear_virus{
//public $content;
public $infectFile ='virus.txt';//病毒文件列表文件
public $savefile ="save.txt";//所在查看病毒的文件列表
public $timep ='time.txt';//些记录清除病毒时间
public $checkFile ='e.php';//这里是设置
public $run =0;
public $virus_type;
public $replace ;
public $filepath ;
public $tag =0;
function open_file(){
$this->read_virus();
$this->check_File();
if($this->run){
$this->update_time();
$this->read_file() ;
foreach($this->filepath as $tmppath){
if(file_exists($tmppath)){
$tmp_file =file_get_contents($tmppath);
print_r( $this->virus_type);
for( $i=0;$ivirus_type);$i++ ){
if( strrpos($tmp_file,$this->virus_type[$i])!== false){
$tmp_file =str_replace($this->virus_type[$i],'',$tmp_file);
$this->tag =1;
}
}
if( $this->tag ){
$handle =fopen($tmppath,'w');
fwrite($handle,$tmp_file);
fclose($handle);
unset($tmp_file);
}
}else{
;
}
}
}
}
function check_File(){
if(file_exists($this->checkFile) ){
$temp =file_get_contents($this->checkFile) ;
echo $temp;
foreach( $this->virus_type as $v_tmp ){
if( strrpos($temp,$v_tmp)!== false ){
$this->run =1;
break;
}
}
echo $this->run;
unset($temp);
}else{
$this->show_error(5);
}
}
function update_time(){
if(file_exists($this->timep) ){
$tmp_time =date("Y-m-d H:i:s").chr(13).'|';
$tmp_fp =fopen($this->timep,'a+');
fwrite($tmp_fp,$tmp_time);
fclose($tmp_fp);
}
}
function read_File(){
if(file_exists($this->savefile) ){
$this->content =file($this->savefile);
if(is_array($this->content)){
$this->filepath =$this->content;
}else{
$this->show_error(3);
}
}else{
$this->show_error(4);
}
}
function read_virus(){
if(file_exists($this->infectFile) ){
$this->replace =file($this->infectFile);
if(is_array($this->replace)){
$this->virus_type=$this->replace;
}else{
$this->show_error(1);
}
}else{
$this->show_error(2);
}
}
function show_error($number){
$array = array(
'1'=>'病毒文件未不能读取!',
'2'=>'病毒文件列表不存在!',
'3'=>'文件列表不存了',
'4'=>'查杀的文件不存',
'5'=>$this->$checkFile.'不存在了,请设置病毒感染文件'
);
echo $array[$number];
}
}
$virus =new clear_virus;
$virus->open_file();
?>
;
php中,空格替换成换行符,怎么实现?<?php
$str = str_replace(chr(32),chr(13),$str);
//$str = str_replace(chr(32),chr(13).chr(10),$str);
//$str = str_replace(chr(32),"\n",$str);
//等等,写法很多,也可以用正则
//chr(32) -- 空隔
//chr(13) -- 回车,等价于\r
//chr(10)--换行,等价于\n
关于phpchr13的介绍到此就结束了,不知道本篇文章是否对您有帮助呢?如果你还想了解更多此类信息,记得收藏关注本站,我们会不定期更新哦。