易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP 无限分类

<?php
//作者:梁文平 http://www.tyasp.net
session_start();
if($_SESSION["username"]!="admin")
{
echo("<mce:script type="text/javascript"><!--
alert("操作超时!请重新登陆...");window.location.href="../index.php";
// --></mce:script>");
//header("refresh:0;url=../");
exit();
}
include("../../include/include.php");
$simple=new simple_gb;
$simple->linkdb($host,$user,$password,$db);
if($_GET["action"]=="submit")
{
$result=mysql_query("select max(ClassId)+1 as aa from newsclass");
$row=mysql_fetch_array($result);
$sql="insert into newsclass (ClassId,ClassDesc,ParentId) values("". $row["aa"] ."","". $_POST["txtClassDesc"] ."","". $_POST["dropParentId"] ."")";
mysql_query($sql);
echo("提交成功!");
exit();
}
/*
$sql="insert into news (newstitle,content,savedate) values("a","b","". date("Y-m-d H:i:s") ."")";
mysql_query($sql,$simple->con);
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF8" />
<title></title>
</head>
<body>
<link href="../Admin_Style.css" mce_href="Admin_Style.css" rel="stylesheet" type="text/css" />
<form id="form1" name="form1" method="post" action="?action=submit">
<table width="427" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td width="58">类别名:</td>
<td width="353"><label>
<input name="txtClassDesc" type="text" id="txtClassDesc" />
</label></td>
</tr>
<tr>
<td>父 类:</td>
<td><label>
<select name="dropParentId" id="dropParentId">
<option value="0">根目录</option>
<?php
$result=@mysql_query("sel


相关文档:

Linux中安装PHP 5教程

第一步 安装MySQL
[root@localhost usr]# groupadd mysql
[root@localhost usr]# useradd -g mysql mysql
[root@localhost usr]# cd /usr/local
[root@localhost local]# tar -zxvf mysql-5.0.51.tar.gz
[root@localhost local]# cd mysql-5.0.51
[root@localhost mysql-5.0.51# ./configure --prefix=/usr/local/my ......

php的版本区别

VC6是什么?
VC6就是legacy Visual
Studio 6 compiler,就是使用这个编译器编译的
VC9是什么?
VC9就是the Visual Studio
2008 compiler,就是用微软的VS编辑器编译的
那我们如何选择下载哪个版本的PHP呢?
如果你是在windows下
使用Apache+PHP的,请选择VC6版本;
如果你是在windows下使用IIS+PHP的,请选择VC9 ......

PHP函数(2)

in_array(value,array,type)        //检查一个值是否在数组中,type可选,设置为true检查类型是否相同,分大小写
例:
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo "Got Irix"; ......

php 安全模式的不足

PHP的safe_mode选项的目的是为了解决本章所述的某些问题。
但是,在PHP层面上去解决这类问题从架构上来看是不正确的,正如PHP手册所述(http://php.net/features.safe-mode)。
当安全模式生效时,PHP会对正在执行的脚本所读取(或所操作)文件的属主进行检查,以保证与该脚本的属主是相同的。
虽然这样确实可以防范本章中 ......

php下载文件代码

一般的文件安全下载方法可以使用下面的代码:
1. <?php?
2.
3. $durl = 'file/phpcms2008_o2abf32efj883c91a.iso';
4. $filename = 'phpcms2008_o2abf32efj883c91a.iso';
5. $file = @fopen($durl, 'r');
6. header("Content-Type: application/octet-stream");
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号