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

PHPÀàµÄ×Ô¶¯¼ÓÔØ

ͨ³£ÎÒÃÇдһ¸öÀàÈçÏ£º
a.php
class A
{
public function __construct()
{
echo "hello world!";
}

page.php
require("a.php");
$a = new A(); 
ÎÒÃÇÊÇͨ¹ýÊÖ¹¤ÒýÓÃij¸öÀàµÄÎļþÀ´ÊµÏÖº¯Êý»òÕßÀàµÄ¼ÓÔØ
µ«Êǵ±ÏµÍ³±È½ÏÅÓ´ó£¬ÒÔ¼°ÕâЩÀàµÄÎļþºÜ¶àµÄʱºò£¬ÕâÖÖ·½Ê½¾ÍÏԵ÷dz£²»·½±ãÁË
ÓÚÊÇPHP5ÌṩÁËÒ»¸ö::auotload::µÄ·½·¨
ÎÒÃÇ¿Éͨ¹ý±àд¸Ã·½·¨À´×Ô¶¯¼ÓÔØµ±Ç°ÎļþÖÐʹÓõÄÀàÎļþ
page.php
function __autoload($classname)
{
$class_file = strtolower($classname).".php";
if (file_exists($class_file)){
require_once($class_file);
}
}
$a = new A(); 
ÕâÑù£¬µ±Ê¹ÓÃÀàAµÄʱºò£¬·¢ÏÖµ±Ç°ÎļþÖÐûÓж¨ÒåA£¬Ôò»áÖ´ÐÐautoloadº¯Êý£¬²¢¸ù¾Ý¸Ãº¯ÊýʵÏֵķ½Ê½£¬È¥¼ÓÔØ°üº¬AÀàµÄÎļþ
ͬʱ£¬ÎÒÃÇ¿ÉÒÔ²»Ê¹Óø÷½·¨£¬¶øÊÇʹÓÃÎÒÃÇ×Ô¶¨ÒåµÄ·½·¨À´¼ÓÔØÎļþ£¬ÕâÀï¾ÍÐèҪʹÓõ½º¯Êý
bool spl_autoload_register ( [callback $autoload_function] ) 
page.php
function my_own_loader($classname)
{
$class_file = strtolower($classname).".php";
if (file_exists($class_file)){
require_once($class_file);
}
}
spl_autoload_register("my_own_loader");
$a = new A(); 
ʵÏÖµÄÊÇͬÑùµÄ¹¦ÄÜ
×Ô¶¨ÒåµÄ¼ÓÔØº¯Êý»¹¿ÉÒÔÊÇÀàµÄ·½·¨
class Loader
{
public static function my_own_loader($classname)
{
$class_file = strtolower($classname).".php";
if (file_exists($class_file)){
require_once($class_file);
}
}
}
// ͨ¹ýÊý×éµÄÐÎʽ´«µÝÀàºÍ·½·¨µÄÃû³Æ
spl_autoload_register(array("my_own_loader","Loader"));
$a = new A(); 


Ïà¹ØÎĵµ£º

php¶ÁÈ¡ºÍ´´½¨wordÎĵµ

×ܽáϱ¾ÈËÔÚÈÕ³£¹¤×÷ÖÐʹÓÃphp²Ù×÷wordµÄһЩʵս¡£
·½·¨Ò»£ºÀûÓÃphp comÄ£¿é
¡£Ò²¼´ÀûÓÃwordÌṩµÄ±¾µØapi£¬ËùÓÐÖ»ÊÊÓÃÓÚwindowsϵͳÉÏ¡£
<?php
$word = new com('word.application') or die('ÎÞ·¨´ò¿ªword');
$word->Visiable = false;
$doc_file = '/path/to/doc';
$word->Open($doc_file);
$text = ' ......

ubuntu10.04ÅäÖÃapache+php+mysql

1.°²×°apache2.0
¡¡¡¡sudo apt-get install apache2
¡¡¡¡°²×°ºóÔÚä¯ÀÀÆ÷Öдò¿ª£º
¡¡
¡¡http://localhost/»òÕßhttp://127.0.0.1
¡¡¡¡Èç¹û³öÏÖIt works!£¬ÄÇÖ¤Ã÷°²×°³É¹¦¡£
¡¡
¡¡2.°²×°PHP
¡¡¡¡sudo apt-get install php
5 //°²×°PHP
5
¡¡
¡¡sudo apt-get install libapache2-mod-php5 //ÅäÖÃAPACHE+PHP
¡¡¡¡sud ......

phpÖеÄevalºÍJavaScriptÖеÄeval

phpÖеÄevalºÍJavaScriptÖеÄevalÇø±ð£º
Definition and Usage

¶¨ÒåºÍÓ÷¨
The eval() function evaluates a
string as PHP code.
eval()º¯ÊýµÄ×÷ÓÃÊÇ£º·µ»ØÓëPHP´úÂëÏà¶ÔÓ¦µÄ×Ö·û´®¡£
The string
must be valid PHP code and must end with semicolon.
Õâ¸ö×Ö·û´®±ØÐëÊÇÓÐЧµÄ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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ