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

PHP°²×°³ÌÐòÖÆ×÷

<?php
header("Content-type:text/html;charset=gb2312"); //¿´ÄãÓõÄÊÇʲô±àÂ룬Ҫ±£³ÖÒ»Ö¡£
$files="config.php"; //ҪдÈëµÄÅäÖÃÎļþ¡£
if(!is_writable($files)){ //ÅжÏÊÇ·ñÓпÉдµÄȨÏÞ£¬linux²Ù×÷ϵͳҪעÒâÕâÒ»µã£¬windows²»±Ø×¢Òâ¡£
echo "<font color=red>Îļþ²»¿Éд</font>";
exit();
}
if($_POST['install']){ //»ñÈ¡Óû§Ìá½»µÄÊý¾Ý¡£
$host=$_POST['host'];
$user=$_POST['user'];
$password=$_POST['password'];
$dbname=$_POST['dbname'];

$config="<?php "; //$configµÄÄÚÈݾÍÊÇҪдÈëÅäÖÃÎļþµÄÄÚÈÝ¡£
$config.="\n"; // \nÊÇÓÃÀ´»»Ðеġ£
$config.="\$host='".$host."';";
$config.="\n";
$config.="\$user='".$user."';";
$config.="\n";
$config.="\$password='".$password."';";
$config.="\n";
$config.="\$dbname='".$dbname."';";
$config.="\n";
$config.="?>";

$file = fopen($files, "w"); //ÒÔдÈëµÄ·½Ê½´ò¿ªconfig.phpÕâ¸öÎļþ¡£
fwrite($file,$config); //½«ÅäÖÃÐÅϢдÈëconfig.phpÎļþ¡£
fclose($file);
include_once("config.php"); //µ¼ÈëÅäÖÃÐÅÏ¢.
if(!$conn=@mysql_connect($host,$user,$password)){
echo "Á¬½ÓÊý¾Ý¿âʧ°Ü£¡Çë·µ»ØÉÏÒ»Ò³¼ì²éÁ¬½Ó²ÎÊý <a href="javascript:history.go(-1)" mce_href="javascript:history.go(-1)"><font color=#ff0000>·µ»ØÐÞ¸Ä</font></a>";
exit();
}else{
mysql_query("set names gb2312"); //ÉèÖÃÊý¾Ý¿âµÄ±àÂ룬עÒâÒªÓëÇ°ÃæÒ»Ö¡£
if(!mysql_select_db($dbname,$conn)){ //Èç¹ûÊý¾Ý¿â²»´æÔÚ£¬ÎÒÃǾͽøÐд´½¨¡£
$dbsql="CREATE DATABASE `$dbname`";
if(!mysql_query($dbsql)){
echo "´´½¨Êý¾Ý¿âʧ°Ü£¬ÇëÈ·ÈÏÊÇ·ñÓÐ×ã¹»µÄȨÏÞ£¡<a href="javascript:history.go(-1)" mce_href="javascript:history.go(-1)"><font color=#ff0000>·µ»ØÐÞ¸Ä</font></a>";
exit();
}
}
//ÏÂÃæ¸ù¾ÝÄãʵ¼ÊµÄ±íµÄ½á¹¹¸ú³õʼ»¯±íµÄÊý¾ÝÀ´Ð´£¬ÕâЩsqlÓï¾ä£¬ÎÒÃÇÔÚµ¼³öʱ¿ÉÒÔÕÒµ½¡£
//н¨Ò»¸ö±ítest1
$sql_query[] = "CREATE TABLE `test1` (
`id` int(4) NOT NULL auto_increment,
`name` varchar(


Ïà¹ØÎĵµ£º

PHP²éѯÏÔʾSqlServerÖеÄÖÐÎÄ

ÒòΪ¹¤×÷ÐèÒª£¬Êý¾Ý¿âʹÓõÄMS SQL Server2005£¬¶øÄ¬ÈϵÄÅÅÐò¹æÔòÊÇSQL_Latin1_General_CP1_CI_AS¡£´´½¨ÁËÒ»¸ö±í£¬ÒòΪÐèÒª´æ´¢ÖÐÎÄÐÅÏ¢£¬Address×ֶεÄÀàÐÍÊÇnvarchar(255)¡£
´ËʱʹÓÃphpÀ´Á¬½Ósql server£¬Ò³ÃæµÄ±àÂëºÍÎļþµÄ±àÂë¶¼ÊÇUTF-8£¬²éѯ´ËAddress×ֶΣ¬ÏÔʾÔÚÒ³ÃæÉÏÊÇ???Ö®ÀàµÄ¡£Ôõô½â¾ö£¿
ʹÓÃ
iconv('iso- ......

crontabÀïÔËÐÐphpÎÞ·¨Á¬½Óµ½Êý¾Ý¿â

ÎÒÔÚmy.cnfÖÐ×¢Ê͵ôlog-bin=mysql-binºÍbinlog_format=mixedºó,ÎÞ·¨Æô¶¯mysql
ÎÒÖØÆôvpsºó,ÄÜÆô¶¯mysqlÀ²
ÓÃweb·½Ê½ÔËÐÐphp,Õý³£
µ«ÊÇÔÚcrontabÀïÖ´ÐеÄphp½Å±¾,Ìáʾ: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ²é¿´µ½/var/lib/mysql/Ŀ¼ÏÂ,ÓÐÒ»¸ömysql.s ......

ASP¡¢JSPÓëPHP Äã»áѡ˭

 Ä¿Ç°£¬×î³£ÓõÄÈýÖÖ¶¯Ì¬ÍøÒ³ÓïÑÔÓÐASP(Active   Server   Pages),JSP(Java   Server   Pages),  
  PHP   (Hypertext   Preprocessor)¡£    
   
  ¼ò   ½é    
   
  ¡¡¡¡ASPÈ«ÃûActive   Server & ......

PHP ¶àÓïÑÔÍøÕ¾½â¾ö·½°¸

ǰÑÔ£º
¡¡¡¡¶àÓïÑÔÍøÕ¾¿ª·¢£¬ÖصãµÄ»¹ÊÇÔÚ½â¾öÓïÑÔÖ®¼äµÄÎÊÌâ¡£
¡¡¡¡ÄÇÈçºÎ½â¾öÕâ¸öÎÊÌâÄØ?´ó¸Å¾Í·ÖÈý²½×ߣº
¡¡¡¡1.Ò³Ãæ¶àÓïÑÔ
¡¡¡¡2.Êý¾Ý¿â¶àÓïÑÔ
¡¡¡¡3.Óû§·ÃÎÊÓïÑÔͳһ
¡¡¡¡1.Ò³Ãæ¶àÓïÑÔ
¡¡¡¡ÐèÒª¿¼ÂǵÄÎÊÌ⣺
¡¡¡¡A.Óû§µÇ½ʱºò£¬×Ô¶¯Ê¶±ð×Ö·û£¬µ÷Óò»Í¬µÄÓïÑÔ°ü?
¡¡¡¡B.Óû§Çл»²»Í¬ÓïÑÔʱºò£¬µ÷Óò»Í¬µÄÓï ......

php ×Ö·û´®²Ù×÷º¯ÊýÏê½â

×Ö·û´®µÄ²Ù×÷ÔÚPHP±à³ÌÖÐÕ¼ÓÐÖØÒªµÄµØÎ»£¬¼¸ºõËùÓÐPHP½Å±¾µÄÊäÈëºÍÊä³ö¶¼Óõ½×Ö·û´®¡£ÓÈÆäÔÚPHPÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÎªÁËʵÏÖijÏÄÜ£¬¾©³ÇÐèÒª¶ÔijЩ×Ö·û´®½øÐÐÌØÊâ´¦Àí£¬Èç»ñÈ¡×Ö·û´®µÄ³¤¶È¡¢½ØÈ¡×Ö·û´®¡¢Ìæ»»×Ö·û´®µÈ¡£ËùÒÔÕâÒ²ÊÇÎÒÃǽñÌì¿Î³ÌµÄÖ÷ÒªÄÚÈÝ£¬Ï£ÍûѧԱ¿ÉÒÔÈÏÕæÑ§Ï°£¬ÇÚ¼ÓÁ·Ï°¡£
8.3.1 È¥³ý×Ö·û´®Ê×λ¿Õ¸ñºÍÌØÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ