class book {
function getName() {
echo 'bookname';
}
function getsex(){
echo "男";
}
}
$func = 'getName';
$book = new book();
$book->$func();
echo '<br>';
$func='getsex';
$book->$func();
function getName() {
echo 'bookname';
}
function getsex(){
echo "男";
}
}
$func = 'getName';
$book = new book();
$book->$func();
echo '<br>';
$func='getsex';
$book->$func();
2015-07-17
<?php
setcookie('test', time());
//在这里试着删除test的cookie值
setcookie('test','',time()-1);
var_dump($_COOKIE);
setcookie('test', time());
//在这里试着删除test的cookie值
setcookie('test','',time()-1);
var_dump($_COOKIE);
2015-07-16