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('
Ïà¹ØÎĵµ£º
´úÂëinterface StringSearchable
{
public function search($substring, $buffer);
}
class BoyerMooreStringSearch implements StringSearchable
{
public $substring = null;
public ......
<?php
* xCopy("feiy","feiy2",1):¿½±´feiyϵÄÎļþµ½ feiy2,ÍÆÏúÔ±µÄÒ»Ìì,°üÀ¨×ÓĿ¼
*²ÎÊý˵Ã÷£º
* $destination:Ä¿µÄĿ¼Ãû
......
ÎÒ×îÔç½Ó´¥µÄ±à³Ì¹¤¾ßÊÇDreamweaver£¬ÆäʵӦ¸ÃÊÇ×¼±à³Ì¹¤¾ß°É£¬ÎÒÄÇʱºòÓõĺÃÏñÊÇ
4£¬Èç¹ûÎÒûÓмǴíµÄ»°£¬È»ºóºóÀ´»¹ÓÐÒ»¸ö°æ±¾½ÐUtralµÄ£¬´Ó×î³õÆڵİ汾һֱµ½ÏÖÔÚµÄCS4£¬µ±ÄêµÄMicromedia¹«Ë¾ÒѾ±»Adobe¹«Ë¾
ÊÕ¹ºÁË£¬ÎÒ»¹ÊÇÔÚÓá£ÔÚHTMLµÄ±à¼·½Ã棬DWÓÐ×ÅÎ޿ɱÈÄâµÄÓÅÊÆ£¬ÎÒÏÖÔÚд.Net»¹ÊÇÏ°¹ßÔÚDWÀï½øÐÐÒ³Ãæ²¼¾ ......
ÕÒÁ˺ܶàÕâÑùµÄº¯Êý£¬»¹ÊǾõµÄÕâ¸ö×îºÃÁË
$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
$im = imagecreatefromjpeg("ok.jpg");
$black = @imagecolorallocate($im, 0,0,0);
$jpgnumid = "ÕâÊÇǶÈ뵽ͼƬµÄÎÄ×Ö£¬½â¾öÁËÂÒÂëÎÊÌâ,
ÉÏÃæµÄok.jpgÊÇͬĿ¼ÏµÄÕÕƬ.ʹÓÃËüʱ£¬»¹ÐèÒªÓÐiconv
Ä£¿é£¡Ò²¾ÍÊÇ˵ÔÚphp.iniÀォ
[iconv]
iconv.input_encoding = ISO-8859-1
iconv.internal_encodin ......