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

PHP ÖÆ×÷ͨѶ¼£¨ËÄ£©

Õâ´ÎÎÒÃǽ²ÈçºÎÓÃPHP´´½¨Êý¾Ý¿âÒÔ¼°±í£¬ºÍ±£´æÏà¹ØÅäÖÃ
ÏÈ´´½¨Ò»¸öÒ³Ã棬ÓÃÀ´ÊäÈëÏà¹ØÐÅÏ¢
±íµ¥¶¯×÷Ϊ CreateData.php £¬±£´æΪInstall.html (ÒòΪûÓÐÓõ½PHP£¬ËùÒÔ¿ÉÒÔ±£´æΪHTML¸ñʽ)
È»ºó´´½¨Ò»¸öPHPÎļþ£¬±£´æΪCreateData.php £¬ÓÃÀ´´´½¨Êý¾Ý¿âºÍ±£´æÏà¹ØÐÅÏ¢
<?php
if(file_exists("Config.php"))
{
echo "Config.phpÒѾ­´æÔÚ£¡";
return;
}
$host = $_POST['host']; //Êý¾Ý¿â·þÎñÆ÷
$user = $_POST['user']; //Êý¾Ý¿âÓû§Ãû
$pass = $_POST['password']; //Êý¾Ý¿âÃÜÂë
$dbname = $_POST['dbname']; //Êý¾Ý¿âÃû
$tablename = $_POST['tablename']; //±íÃû
////////////////////////////////////////////
$conn = mysql_connect($host,$user,$pass);
if (!$conn)
{
die('ÎÞ·¨Á¬½Ó£º' . mysql_error());
return;
}
/*
*$sql = "CREATE DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;"
*Èç¹ûÊý¾Ý¿âÏÔʾÂÒÂëÔòÓÃÕâ¾äÊÔÊÔ
*/
if(!mysql_query("CREATE DATABASE $dbname",$conn))
{
echo "Êý¾Ý¿â´´½¨Ê§°Ü£º" . mysql_error();
return;
}
mysql_select_db($dbname, $conn);
$sql = "CREATE TABLE `$tablename` (
`ID` INT NOT NULL ,
`Name` VARCHAR( 15 ) NOT NULL ,
`Sex` INT NOT NULL ,
`Birthday` DATE NOT NULL ,
`QQ` VARCHAR( 15 ) NOT NULL ,
`Mobile` VARCHAR( 25 ) NOT NULL ,
`Email` VARCHAR( 50 ) NOT NULL ,
`Address` VARCHAR( 50 ) NOT NULL ,
INDEX ( `ID` )
)";
mysql_query($sql,$conn);
mysql_close($conn);
///////////////////////////////////////////////////////////////////////
$configFile = fopen("Config.php","a");
fwrite($configFile,"<?php\r\n");
fwrite($configFile,"define('SqlName','$host');\r\n"); //Êý¾Ý¿â·þÎñÆ÷
fwrite($configFile,"define('SqlUserName','$user');\r\n"); //Êý¾Ý¿âÓû§Ãû
fwrite($configFile,"define('SqlPassword','$pass');\r\n"); //Êý¾Ý¿âÃÜÂë
fwrite($configFile,"define('


Ïà¹ØÎĵµ£º

mysql+phpÎÞ·¨Á¬½Ósql£¨Òѽâ¾ö£©

¸ãÁ˺ܾᣡ£ÖÕÓÚ·¢ÏÖÔ­À´ÊÇȨÏÞÎÊÌâ¡£¡£
2ÐÐÃüÁî¸ã¶¨
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
¾­µäÁË¡£¡£¡£
ħÁ¦Ë½·þÍøÒ³¶Ë¸ã¶¨¿©~~ ......

PHP bug??global·¢ÏÖµÄÎÊÌâ

ÈçÏÂphp´úÂë
<?php
$type='a';
$target='type';
$a=array(1,2,3);
a($target);
function a($type)
{
    global $$type;
    var_dump($$type);
}
?>
Ô¤¼ÆÊä³öµÄÊÇstring(1)”a”
¿ÉÊǽá¹ûÊÇ
Notice: Undefined variable: a in D:\web\global.php on ......

дPHP»¹ÊÇZendºÃÓÃ


ÎÒ×îÔç½Ó´¥µÄ±à³Ì¹¤¾ßÊÇDreamweaver£¬ÆäʵӦ¸ÃÊÇ×¼±à³Ì¹¤¾ß°É£¬ÎÒÄÇʱºòÓõĺÃÏñÊÇ
4£¬Èç¹ûÎÒûÓмǴíµÄ»°£¬È»ºóºóÀ´»¹ÓÐÒ»¸ö°æ±¾½ÐUtralµÄ£¬´Ó×î³õÆڵİ汾һֱµ½ÏÖÔÚµÄCS4£¬µ±ÄêµÄMicromedia¹«Ë¾ÒѾ­±»Adobe¹«Ë¾
ÊÕ¹ºÁË£¬ÎÒ»¹ÊÇÔÚÓá£ÔÚHTMLµÄ±à¼­·½Ã棬DWÓÐ×ÅÎ޿ɱÈÄâµÄÓÅÊÆ£¬ÎÒÏÖÔÚд.Net»¹ÊÇÏ°¹ßÔÚDWÀï½øÐÐÒ³Ãæ²¼¾ ......

php ½ØÈ¡utf 8×Ö·û´®

ÕÒÁ˺ܶàÕâÑùµÄº¯Êý£¬»¹ÊǾõµÄÕâ¸ö×îºÃÁË
$a = 'aadfdsf¶á¶¥ÌæÒ»¿Ý»ù22245¶¥ÌæsdffhѹÏÂ';
/**
* ½ØÈ¡utf-8×Ö·û
* @param string $string
* @param int$length
*
* return string
*/
function cutstr($string, $length) {
preg_match_all("/./u", $string, $info);
$i = 0;
$str = '';
foreach($inf ......

PHP°²×°ÅäÖÃ

#./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-bz2 --with-curl - --with-curlwrappers --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --w ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ