<html>
<head>
<html>
<head>
本站推荐出百度、谷歌关键词排名在线查询哦,
查询地址:
js 可增加删除图片上传框js代码
本款程序可以检测用户上传图片类型,大小,在上传之前,同时也可以增加多文件上传,就是不定文件多少,仿51空间那种文件上代码
本网站提供站长工具,alexa信息查询,alexa详细查询,alexa信息查询工具,alexa详细查询工具等信息,
查询地址:http://www.phprm.com
在做... while语句类似的声明时,除了测试条件在每次迭代结束,而不是在开始。这
意味着你... While循环是保证至少运行一次。在做... While循环的语法如下:
<?php
require ('resize_img.php');
//how to use the class:
//makes a simple thumbnail of an image of 100x100 and saves the image then outputs it.
$imgresize = new resize_img();
<?php
class My_Lib_Functions {
# ********************************************
# 对象转数组
# ********************************************
function object2array ($obj) {
foreach ($obj as $k => $v) {
$arr[$k] = $v;
unset($v);
}
return $arr;
}
class Client{
public function __construct()
{
/**/
}
/**
* 获取浏览器客户端
*
* @return string
*/
public function browser()
{
$info = $_SERVER['HTTP_USER_AGENT'];
if(strstr($info,'MSIE 6.0') != false){
return 'IE6';
}elseif (strstr($info,'MSIE 7.0') != false){
return 'IE7';
}elseif (strstr($info,'Firefox') != false){
return 'Firefox';
}elseif (strstr($info,'Chrome') != false){
return 'Chrome';
}elseif (strstr($info,'Safari') != false){
return 'Safari';
}else{
return 'unknow';
}
}
/**
* 获取操作系统
* @return string
*/
public function getOS ()
{
$agent = $_SERVER['HTTP_USER_AGENT'];
$os = false;
if (eregi('win', $agent) && strpos($agent, '95')){
$os = 'Windows 95';
}
else if (eregi('win 9x', $agent) && strpos($agent, '4.90')){
$os = 'Windows ME';
}
else if (eregi('win', $agent) && ereg('98', $agent)){
$os = 'Windows 98';
}
else if (eregi('win', $agent) && eregi('nt 5.1', $agent)){
$os = 'Windows XP';
}
else if (eregi('win', $agent) && eregi('nt 5', $agent)){
$os = 'Windows 2000';
}
else if (eregi('win', $agent) && eregi('nt', $agent)){
$os = 'Windows NT';
}
else if (eregi('win', $agent) && ereg('32', $agent)){
$os = 'Windows 32';
}
else if (eregi('linux', $agent)){
$os = 'Linux';
}
else if (eregi('unix', $agent)){
$os = 'Unix';
}
else if (eregi('sun', $agent) && eregi('os', $agent)){
$os = 'SunOS';
}
else if (eregi('ibm', $agent) && eregi('os', $agent)){
$os = 'IBM OS/2';
}
else if (eregi('Mac', $agent) && eregi('PC', $agent)){
$os = 'Macintosh';
}
else if (eregi('PowerPC', $agent)){
$os = 'PowerPC';
}
else if (eregi('AIX', $agent)){
$os = 'AIX';
}
else if (eregi('HPUX', $agent)){
$os = 'HPUX';
}
else if (eregi('NetBSD', $agent)){
$os = 'NetBSD';
}
else if (eregi('BSD', $agent)){
$os = 'BSD';
}
else if (ereg('OSF1', $agent)){
$os = 'OSF1';
}
else if (ereg('IRIX', $agent)){
$os = 'IRIX';
}
else if (eregi('FreeBSD', $agent)){
$os = 'FreeBSD';
}
else if (eregi('teleport', $agent)){
$os = 'teleport';
}
else if (eregi('flashget', $agent)){
$os = 'flashget';
}
else if (eregi('webzip', $agent)){
$os = 'webzip';
}
else if (eregi('offline', $agent)){
$os = 'offline';
}
else {
$os = 'Unknown';
}
return $os;
}
while语句执行的代码块,如果只要在指定条件计算为true。如果条件变得假,在循环
中的语句停止执行和控制传递给语句后面的循环。 while循环的语法如下:
while (condition)
{
code to be executed;
}
在相关的声明,但始终是在封闭(开幕式和闭幕式的大括号)代码块符号告诉PHP代码