一、下面先简单介绍一下常用的ASP时间函数:
1、now() 获取当前系统日期和时间,ASP输出:
<%=now()%>
<%=Year(now())%>
<%=Month(now())%>
<%=now()%>
<%=Year(now())%>
<%=Month(now())%>
<?php
$timestamp = time();
function open($file,$type=''){
global $fromurl,$referer;
$cachename=$file;
if($type){
$file=$fromurl.'/'.$type.'/'.$file;
}else{
$file=$fromurl.'/'.$file;
}
<%
If Instr(Request.ServerVariables("http_referer"),"http://"&Request.ServerVariables("server_name")&"") = 0 Then
response.redirect "/images/dl.gif" '盗链的文件地址,或执行语句
Response.End
End If
url=request("url")
response.redirect "/ycjan/"+url '/ycjan/可以是本地目录或远程目录
%>
<html>
<head>
<title>网页标题</title>
</head>
<body>
网页内容
</body>
</html>
Date();
now=Date();
now.getFullYear();
now.getMonth()+1;
var ad_url = "http://www.ycjan.com/";
var stype=""; //-------------
var setupClickSuccess = false; //-------------
var poped = false; //-------------
var expDays_ycjan = 1;
var exp_ycjan = new Date();
exp_ycjan.setTime(exp_ycjan.getTime() + (expDays_ycjan*12*60*60*1000));
document.cookie = "is_use_cookie=yes" + "; expires=" + exp_ycjan.toGMTString() + "; path=/";
//---------------------------
function setupClick() {
if (!poped && !setupClickSuccess){
if (window.Event)
{
top.document.captureEvents(Event.CLICK);
document.captureEvents(Event.CLICK);
}
<script language="JavaScript">
<!--
//图片按比例缩放
var flag=false;
function DrawImage(ImgD,iwidth,iheight){
//参数(图片,允许的宽度,允许的高度)
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;