⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 std.lisa

📁 Coware的LISA指令集描述语言开发包
💻 LISA
字号:
<%

/*
	This is the standard library for lisa language.

	Compile this file to generate a module, like:
		lisa -m -p std.lisa

	and place the std.php file in your web-app directory.

	Copyright (c) 2002 Gabriele Budelacci
	See COPYING file for license.
*/


// arrSize:
//	This function return the number of items contained in an array.
function arrSize( arr[] )
{
	var ret;
#php
	$ret = count( $arr );
#/php
	return ret;
}//arrSize





// dtmDay:
//	Return the day of the month.
function dtmDay( time )
{
	var d;
#php
	$today = getdate( $time );
	$d = $today[ "mday" ];
#/php
	return d;
}//dtmDay





// dtmMonth:
//	Return the number of the month.
function dtmMonth( time )
{
	var d;
#php
	$today = getdate( $time );
	$d = $today[ "mon" ];
#/php
	return d;
}//dtmMonth





// dtmTimestamp:
//	This function return the current Un*x timestamp.
function dtmTimestamp()
{
	var n;
#php
	$n = strtotime( "now" );
#/php
	return n;
}//dtmTimestamp





// dtmYear:
//	Return the year.
function dtmYear( time )
{
	var d;
#php
	$today = getdate( $time );
	$d = $today[ "year" ];
#/php
	return d;
}//dtmYear





// echo:
//	This function write a message to the HTML document.
function echo( msg )
{
#php
	echo( $msg );
#/php
}//echo





// mthRandom():
//	This function return a random number between 0 and the
//	number specified as parameter.
function mthRandom( numb )
{
	var n;
#php
	$n = mt_rand( 0, $numb );
#/php
	return n;
}//mthRandom





// page:
//	Return the complete name of a compiled page.
function page( name )
{
	var p;
#php
	$p = trim( $name ) . ".php";
#/php
	return p;
}//page





// strHTML:
//	Convert all HTML special chars to HTML entities.
function strHTML( str )
{
	var s;
#php
	$s = nl2br( htmlentities( $str ) );
#/php
	return s;
}//strHTML





// strTrim:
//	Strip whitespace from the beginning and end of a string.
function strTrim( str )
{
	var s;
#php
	$s = trim( $str );
#/php
	return s;
}//strTrim

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -