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

ÓÃPHPʵÏÖÒ»¸öË«Ïò¶ÓÁÐ

<?php
class DoubleQueue
{
public $queue = array();
/**£¨Î²²¿£©Èë¶Ó **/
public function push($value)
{
return array_push($this->queue,$value);
}
/**£¨Î²²¿£©³ö¶Ó**/
public function pop()
{
return array_pop($this->queue);
}
/**£¨Í·²¿£©Èë¶Ó**/
public function enq($value)
{
return array_unshift($this->queue,$value);
}
/**£¨Í·²¿£©³ö¶Ó**/
public function deq()
{
return array_shift($this->queue);
}
/**Çå¿Õ¶ÓÁÐ**/
public function makeEmpty()
{
return unset($this->queue);
}
}
class DoubleDueue
{
public $queue = array();

public function push($value)
{
return $this->queue[] = $value;
}
public function pop()
{
$count = $this->count();
if($count >= 1)
{
$value = $this->queue[$count-1];
unset($this->queue[$count-1]);
return $value;
}
else
{
return false;
}
}
public function enq($value)
{
/*²»ºÃ×ö*/
}
public function deq()
{
/*²»ºÃ×ö*/
}
public function count()
{
return count($this->queue);
}
public function makeEmpty()
{
return unset($this->queue);
}
}
?>
Ã²ËÆÓÃÕâËĸöº¯Êý¾ÍÐÐ
array_push — ½«Ò»¸ö»ò¶à¸öµ¥ÔªÑ¹ÈëÊý×éµÄĩ⣨ÈëÕ»£©
array_unshift — ÔÚÊý×鿪ͷ²åÈëÒ»¸ö»ò¶à¸öµ¥Ôª
array_pop — ½«Êý×é×îºóÒ»¸öµ¥Ôªµ¯³ö£¨³öÕ»£©
array_shift — ½«Êý×鿪ͷµÄµ¥ÔªÒƳöÊý×é


Ïà¹ØÎĵµ£º

Apache+Mysql+Php°²×°Îĵµ(rpm°æ±¾)

¡¡¡¡1.mysql
¡¡¡¡ÔÚÈçÏÂÒ³ÃæÏÂÔØmysqlµÄfor linux rpm°ü
¡¡¡¡¡¡http://www.mysql.com/downloads/down...3.52-1.i386.rpm ;
¡¡¡¡¡¡http://www.mysql.com/downloads/down...3.52-1.i386.rpm ;
¡¡¡¡´æÖÁ/home/tmpĿ¼
¡¡¡¡ÃüÁîÁÐ±í£º¡¡
¡¡¡¡cd /home/tmp
¡¡¡¡rpm -ivh MySQL-3.23.52-1.i386.rpm #°²×°mysql serv ......

Apache 2 and PHP 5 (mod_php) on Linux


Apache 2 and PHP Installation
The following notes are how I got Apache 2 and PHP 5 (or PHP 4) working together on Linux. These instructions also apply, mostly, for any UNIX-like system, especially other Linux distributions. If you have a recent Linux distribution (say since 2002), you already hav ......

PHP×Ö·û´®²Ù×÷ÈëÃÅ

ÎÞÂÛÄÄÖÖÓïÑÔ£¬×Ö·û´®²Ù×÷¶¼ÊÇÒ»¸öÖØÒªµÄ»ù´¡£¬ÍùÍùÊǼòµ¥¶øÖØÒª¡£ÕýÏñÈË˵»°Ò»Ñù£¬Ò»°ãÓÐÐÎÌ壨ͼÐνçÃæ£©£¬ÓÐÓïÑÔ£¨print ×Ö·û´®£¿£©£¬ÏÔÈ»×Ö·û´®ÄܽâÊ͸ü¶àµÄ¶«Î÷¡£PHPÌṩÁË´óÁ¿µÄ×Ö·û´®²Ù×÷º¯Êý£¬¹¦ÄÜÇ¿´ó£¬Ê¹ÓÃÒ²±È½Ï¼òµ¥£¬ÏêϸÇë²Î¿´ http://cn2.php.net/manual/zh/ref.strings.php . ÒÔϽ«¼òµ¥µÄ½²ÊöËüµÄ¹¦ÄܺÍÌØÐ ......

Aptana studio 2.0 +aptana php plugin 1.1

I’ve just updated Aptana Studio from 1.5 to 2.0 only to find out that the spectacular Aptana PHP plugin is not longer supported and its installation has been removed from the Install Additional Features view. However, with some tricks we can still install the old Aptana 1.5.1 in order to use i ......

¡¾±±¾©PHPÅàѵ¡¿±±¾©´óѧPHP¹¤³Ìʦ°à»ðÈÈÕÐÉú£¡


    ±±¾©´óѧPHP¹¤³Ìʦ°àÕÐÉú¼òÕÂ
   ÍøÖ·£ºwww.pku-it.com
      ½üÄêÀ´£¬PHPÓïÑÔÒÔÆä¼ò½àÁé»îµÄ±à³Ìģʽ¡¢ÈÕÇ÷ÍêÉÆµÄ¼¼ÊõÌåϵÒÔ¼°Ç¿ÓÐÁ¦µÄ¿ªÔ´Ö§³Ö£¬Ñ¸ËÙ·¢Õ¹³ÉΪȫÇò»¥ÁªÍøÓ¦ÓÃ×îΪ¹ã·ºµÄ±à³ÌÓïÑÔ¡£Ä¿Ç°ÒÑÓг¬¹ý40%µÄWEB³ÌÐòʹÓÃPHPÀ´±àд£¬°Ù¶È¡¢ÌÚÑ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ