
今天无聊看了下静态页面
$nav=$_SERVER["REQUEST_URI"];
if ($nav && strstr($nav, '.htm')) {//如果$nav 有值 .htm
$nav=basename($nav);//basename - 返回路径中的文件名部分
//str_replace - Replace all occurrences of the search string with the replacement string
$nav=str_replace('.htm','',$nav);
echo $nav;
//明白了吧 呵呵
if ($nav && strstr($nav, '.htm')) {//如果$nav 有值 .htm
$nav=basename($nav);//basename - 返回路径中的文件名部分
//str_replace - Replace all occurrences of the search string with the replacement string
$nav=str_replace('.htm','',$nav);
echo $nav;
//明白了吧 呵呵
FMS 视频教程
Posted in FMS&Action on 2006/04/12 / 评论(11) »
高清晰GD缩略图生成方法
--------------------------------------------------------------------------------
gd、gd2都适用的写法。
[code]<?php
$image = "vintdev.JPG"; // 原图
$thumbw = 200; // 期望的目标图宽
$thumbh = 50; // 期望的目标图高
$size = getimagesize($image); // 获取原图大小
$scale = min($thumbw/$size[0], $thumbh/$size[1]); // 计算缩放比例
--------------------------------------------------------------------------------
gd、gd2都适用的写法。
[code]<?php
$image = "vintdev.JPG"; // 原图
$thumbw = 200; // 期望的目标图宽
$thumbh = 50; // 期望的目标图高
$size = getimagesize($image); // 获取原图大小
$scale = min($thumbw/$size[0], $thumbh/$size[1]); // 计算缩放比例
» 阅读全文
Iris出自eeye公司,这款软件主要是用来截包(网络数据包)的。使用方法:http://www.cnpaf.net/Class/OtherAnalysis/05121415340245491129.htm
下载文件
下载文件 



