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

RAP(RDF API FOR PHP )ÉèÖÃÊý¾Ý¿âÁ¬½Ó

ÉèÖÃÊý¾Ý¿âÁ¬½Ó
<?php
/**
 * @author [˹ÈË]
 * @date 2010/6/1/10:16
 * @
 *
 */
define("RDFAPI_INCLUDE_DIR", "E:/siren/rdfapi-php/api/");
include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
//Á¬½Óµ½MSAccessÊý¾Ý¿â£¨rdf_db DSN£©µÄʹÓÃÁ¬½ÓÉèÖÃ
//¶¨Òåconstants.php£º
// -------------------------------------------------------
//Êý¾Ý¿â
// -------------------------------------------------------
//¶¨Ò壨"ADODB_DB_DRIVER"£¬"odbcµÄ"£©;
//¶¨Ò壨"ADODB_DB_HOST"£¬"rdf_db"£©;
//¶¨Ò壨"ADODB_DB_NAME"£¬""£©;
//¶¨Ò壨"ADODB_DB_USER"£¬""£©;
//¶¨Ò壨"ADODB_DB_PASSWORD"£¬""£©;
$rdf_database = ModelFactory::getDbStore();
//´´½¨±íµÄMsAccess
$rdf_database -> createTables('MsAccess');
//Á¬½Óµ½MySQLÊý¾Ý¿â²¢´´½¨±í¡£
//Á¬½Óµ½MySQLÊý¾Ý¿âµÄÓû§¶¨ÒåµÄÁ¬½ÓÉèÖÃ
$rdf_database = ModelFactory::getDbStore('MySQL', 'host', 'db_name', 'user_name', 'password');
 
//´´½¨±íµÄMySQL
$mysql_database->createTables('MySQL'); //Ŀǰֻ֧³ÖMySQLºÍMS SQL ServerÊý¾Ý¿âºÍMsAccess¡£
//Á¬½Óµ½ÆäËûÊý¾Ý¿â
//Á¬½Óµ½OracleÊý¾Ý¿âÓëÓû§¶¨ÒåµÄÁ¬½ÓÉèÖÃ
$oracle_database = ModelFactory::getDbStore('Oracle', FALSE, 'db_name', 'username', 'password' );
//¹Ø±ÕÊý¾Ý¿â
$rdf_database->close();
?>


Ïà¹ØÎĵµ£º

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

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

page.php
require("a.php");
$a = new A(); 
ÎÒÃÇÊÇͨ¹ýÊÖ¹¤ÒýÓÃij¸öÀàµÄÎļþÀ´ÊµÏÖº¯Êý»òÕßÀàµÄ¼ÓÔØ
µ«Êǵ±ÏµÍ³±È½ÏÅÓ´ó£¬ÒÔ¼°ÕâЩÀàµÄÎļþºÜ¶àµÄʱºò£¬ÕâÖÖ·½Ê½¾ÍÏԵ÷dz ......

2010Äê×îÐÂPHPÀàµÄ¾«Ëõ¹éÄÉ

Ò»£º½á¹¹ºÍµ÷ÓÃ(ʵÀý»¯)£º
class className{} £¬µ÷Óãº$obj = new className();µ±ÀàÓй¹Ô캯Êýʱ£¬»¹Ó¦´«Èë²ÎÊý¡£Èç$obj = new className($v,$v2...);
¶þ£º¹¹Ô캯ÊýºÍÎö¹¹º¯Êý£º
1¡¢¹¹Ô캯ÊýÓÃÓÚ³õʼ»¯£ºÊ¹ÓÃ__construct()£¬¿É´ø²ÎÊý¡£
2¡¢µ«Îö¹¹º¯Êý²»ÄÜ´ø²ÎÊý£¨ÓÃÓÚÔÚÏúÈ¥Ò»¸öÀà֮ǰִÐÐһЩ²Ù×÷»ò¹¦ÄÜ£©¡£Îö¹¹º¯ÊýÓà ......

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

<?php
class DoubleQueue
{
public $queue = array();
/**£¨Î²²¿£©Èë¶Ó **/
public function push($value)
{
return array_push($this->queue,$value);
}
/**£¨Î²²¿£©³ö¶Ó**/
public function pop()
{
return array_pop($this->queu ......

web serverʹÓÃphpÉú³ÉwebÒ³ÃæµÄÈýÖÖ·½Ê½

²éÕÒmysql_pconnectʱÔÚmysql°ïÖúÎĵµÉÏ·¢Ïֵ쬼ÇÔÚÕâÀï¡£
web serverʹÓÃphpÉú³ÉÒ»¸öwebÒ³ÃæµÄÈýʽÓÐÒÔÏÂÈýÖÖ£º
Ò»£º°ÑPHP×÷ΪCGI Wrapper¡£ÕâÖÖ·½Ê½Ï£¬Ã¿¸öµ½´ïweb serverµÄÇëÇ󶼻ᵼÖÂÒ»¸öphp½âÎöÆ÷½ø³Ì±»´´½¨£¬µ±Õâ¸öphpÒ³ÃæÖ´ÐнáÊøÊ±£¬Õâ¸öphp½âÎöÆ÷½ø³ÌÖÕÖ¹¡£
¶þ£º
ÔÚ¶à½ø³ÌµÄweb serverÖУ¬°Ñphp×÷Ϊweb
se ......

PHP ɾ³ýij¸öĿ¼ÏÂNÌìǰµÄËùÓÐÎļþ

<?php
function delfile($dir,$n) //ɾ³ýDIR·¾¶ÏÂNÌìǰ´´½¨µÄËùÓÐÎļþ;
{
if(is_dir($dir))
{
if($dh=opendir($dir))
{
while (false !== ($file = readdir($dh)))
{
if($file!="." && $file!="..")
{
$fullpath=$dir."/".$file;
if(!is_dir($fullpath)) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ