ѧϰphp Reflection£¨¶þ£©
(4)Ó³ÉäÀà(ReflectionClass)
ReflectionClassÀàÔÊÐíÄã·´ÏòÓ³ÉäÀà¡£
<?
php
interface MySerializable
{
// ...}
class My
Object
{
// ...}
/** A counter class */
class
Counter
extends
MyObject implements MySerializable
{ const
START
=
0
;
private
static
$c
=
Counter
::
START
;
/**Invoke counter
* @access public
* @return int */
public
function
count
() { return
self
::
$c
++; }
}
// Create an instance of the ReflectionClass class
$class
= new
ReflectionClass
(
'Counter'
);
// Print out basic information
printf
(
"===> The %s%s%s %s '%s' [extends %s]\n"
.
" declared in %s\n"
.
" lines %d to %d\n"
.
" having the modifiers %d [%s]\n"
,
$class
->
isInternal
() ?
'internal'
:
'user-defined'
,
$class
->
isAbstract
() ?
' abstract'
:
''
,
$class
->
isFinal
() ?
' final'
:
''
,
$class
->
isInterface
() ?
'interface'
:
'
Ïà¹ØÎĵµ£º
±éÀúĿ¼Îļþ£¬Ìæ»»±àÂ벿·Ö£¬É¾³ýÔÎļþ£¬ÔÙÖØÐÂתÂëÔÎļþÄÚÈÝ£¬ÖØÐÂÉú³ÉÐÂÎļþ¡£
function explorerdir($sDir){
static $aTempArr=array();
$dp=opendir($sDir);
while ($sFileName = readdir($dp)){
if ($sFileName !='.' && $sFileName !='..'){
......
<?php
//»ñµÃϵͳʱ¼äº¯Êý(×¢Òâ²ÎÊýÖдóдY´ú±íÍêÕûÄê·Ý£¬Ð¡Ð´y´ú±íÄê·Ý¼òд)
$sum = date("Y-m-d");
$sum1 = date("y-m-d");
echo "$sum<br/>";
echo "$sum1<br/>";
//md5¼ÓÃܺ¯Êý
$pass = md5("ÕÅÈý");
......
<html>
<head>
<script type="text/javascript">
<!--
function confirmDelete()
{
return confirm("Are you sure you wish to delete this entry?");
}
//-->
</script>
</head>
<body>
<% $var1 = 2;%> ......
Èç¹ûÄãʹÓÃÒ»Ãæ´ó¾µ×Ó×÷Ϊ³åÀË°å»á·¢Éúʲô£¿»òÐíÄã»áÔڽ϶̵Äʱ¼äÄÚÕ÷·þº£ÀË£¬µ«ÊÇÄã¿Ï¶¨´ÓÄÚÐÄÉî´¦Ã÷°×£¬Õâ²»ÊdzåÀ˵ÄÕýÈ·Ñ¡Ôñ¡£Í¬ÑùµÄµÀÀíÒ²ÊÊÓÃÓÚPHP±à³Ì£¬¾¡¹ÜÕâÑùµÄÀà±ÈÌýÆðÀ´ÓÐһЩ¹Å¹Ö¡£ÎÒÃǾ³£Ìýµ½ÓÐÈËÊÔͼÓÃÒ»¸öÖÜÄ©¶àµãµÄʱ¼äÀ´Ñ§»áPHP£¬µ«ÊÇÇëË¡ÎÒÖ±ÑÔ£¬ÕâÊÇѧϰÕâÃűà³ÌÓïÑÔµÄÒ»Öַdz£Ôã¸âµÄ·½Ê½¡£
ΪºÎ资 ......
<?
class upload{
private $name; //$_FILES['file'][name]
private $type; //$_FILES['file'][type]
privat ......