Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ѧϰ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' 

'


Ïà¹ØÎĵµ£º

php»ù´¡Ó¦ÓãºphpÅúÁ¿×ª»»Îļþ±àÂë

±éÀúĿ¼Îļþ£¬Ìæ»»±àÂ벿·Ö£¬É¾³ýÔ­Îļþ£¬ÔÙÖØÐÂתÂëÔ­ÎļþÄÚÈÝ£¬ÖØÐÂÉú³ÉÐÂÎļþ¡£
function explorerdir($sDir){

static $aTempArr=array();
$dp=opendir($sDir);
while ($sFileName = readdir($dp)){

if ($sFileName !='.' && $sFileName !='..'){

......

PHPÖÐÄÚ²¿º¯ÊýʹÓ÷½·¨

<?php
 
 
  //»ñµÃϵͳʱ¼äº¯Êý(×¢Òâ²ÎÊýÖдóдY´ú±íÍêÕûÄê·Ý£¬Ð¡Ð´y´ú±íÄê·Ý¼òд)
  $sum = date("Y-m-d");
  $sum1 = date("y-m-d");
 
  echo "$sum<br/>";
  echo "$sum1<br/>";
 
  //md5¼ÓÃܺ¯Êý
  $pass = md5("ÕÅÈý");
  ......

[php]how to confirm deleting without using form.

<html>
<head>
<script type="text/javascript">
<!--
function confirmDelete()
{
    return confirm("Are you sure you wish to delete this entry?");
}   
//-->
</script>
</head>
<body>
<% $var1 = 2;%> ......

ÈÃPHP¿ª·¢ÕßÊ°빦±¶µÄÊ®´ó¼¼ÇÉ

Èç¹ûÄãʹÓÃÒ»Ãæ´ó¾µ×Ó×÷Ϊ³åÀË°å»á·¢Éúʲô£¿»òÐíÄã»áÔڽ϶̵Äʱ¼äÄÚÕ÷·þº£ÀË£¬µ«ÊÇÄã¿Ï¶¨´ÓÄÚÐÄÉî´¦Ã÷°×£¬Õâ²»ÊdzåÀ˵ÄÕýÈ·Ñ¡Ôñ¡£Í¬ÑùµÄµÀÀíÒ²ÊÊÓÃÓÚPHP±à³Ì£¬¾¡¹ÜÕâÑùµÄÀà±ÈÌýÆðÀ´ÓÐһЩ¹Å¹Ö¡£ÎÒÃǾ­³£Ìýµ½ÓÐÈËÊÔͼÓÃÒ»¸öÖÜÄ©¶àµãµÄʱ¼äÀ´Ñ§»áPHP£¬µ«ÊÇÇëË¡ÎÒÖ±ÑÔ£¬ÕâÊÇѧϰÕâÃűà³ÌÓïÑÔµÄÒ»Öַdz£Ôã¸âµÄ·½Ê½¡£
ΪºÎ资 ......

ÎÒµÄphpµÄѧϰ

<?
class upload{
private $name;                 //$_FILES['file'][name]
private $type;                 //$_FILES['file'][type]
privat ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ