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

¡¶PHPºÍMySQL Web¿ª·¢¡·±Ê¼Ç֮ʹÓÃPHP£¨¶þ£©


µÚÎåÕ ´úÂëÖØÓÃÓ뺯Êý±àд
require()»òinclude()¿ÉÒÔ½«Ò»¸öÎļþÔØÈëµ½php½Å±¾ÖС£
ÕâÁ½¸öº¯Êý¼¸ºõµÈ¼Û£¬Î¨Ò»µÄÇø±ðÊǵ÷ÓÃʧ°Üºórequire()¸ø³öÒ»¸öÖÂÃü´íÎ󣬶øinclude()Ö»¸ø³öÒ»¸ö¾¯¸æ¡£
Èç¹ûWebÒ³Ãæ¾ßÓÐÒ»ÖµÄÍâ¹Û£¬¿ÉÒÔ½«ÏàͬµÄ²¿·Ö·ÖÀëµ½µ¥¶ÀµÄÒ³ÃæÖУ¬È»ºó¿ÉÒÔÔÚphpÖÐʹÓÃrequire()Óï¾ä½«Ä£°åÔªËؼÓÈëµ½Ò³ÃæÖС£
Èç¹ûÏ£Íû±£Ö¤Ò»¸öÎļþ½«±»µ±×÷ÆÕͨÎı¾»òhtml£¬¶ø²»Ö´ÐÐÈκÎphp£¬¿ÉÒÔʹÓÃreadfile()×÷ΪÌæ´ú·½·¨¡£
require_once()ºÍinclude_once()¿ÉÒÔ±£Ö¤Ä³¸öÎļþÖ»±»°üº¬Ò»´Î£¬ÔÚʹÓú¯Êý¿âµÄʱºò£¬ÕâÁ½¸öº¯Êý·Ç³£ÓÐÓ㬿ÉÒÔ·ÀÖ¹ÒâÍâµØ¶à´Î°üº¬ÏàͬµÄº¯Êý¿â£¬´Ó¶øµ¼Öº¯ÊýµÄÖظ´¶¨Òå²¢²úÉú´íÎó¡£
Ò²¿ÉÒÔÔÚphp.iniÅäÖÃÎļþÖУ¬Ê¹ÓÃauto_prepend_fileºÍauto_append_fileÕâÁ½¸öÑ¡ÏîÀ´ÉèÖÃҳüºÍÒ³½Å£¬¿ÉÒÔ±£Ö¤ËüÃÇÔÚÿ¸öÒ³ÃæµÄÇ°ºó±»ÔØÈë¡£´Ëʱ¾Í¿ÉÒÔ²»ÔÙÓÃinclude()Óï¾ä¡£
auto_prepend_file = "/home/***/header.inc"
Èç¹ûʹÓõÄapache£¬Ôò¿ÉÒÔ¸øÿ¸öĿ¼µ¥¶ÀÉ趨£¬ÔÚĿ¼Öд´½¨ÃûΪ.htaccessµÄÎļþ£¬²¢ÔÚÎļþÖаüº¬ÈçϵĴúÂ룺
php_value auto_prepend_file "/home/***/header.inc"
(phpµÄºÜ¶àÆäËüÑ¡ÏîÒ²¿ÉÒÔͨ¹ýÕâÖÖ·½·¨À´ÉèÖÃ)
º¯ÊýÉùÃ÷·½·¨£º
function my_function()
{ echo 'myfunction'; }
º¯Êýµ÷Óò»Çø·Ö´óСд¡£function_name()µÈ¼ÛÓÚFunCtion_NaMe()¡£
phpÖк¯Êý¶¨Òå²»ÄܺÍÒÑÓеĺ¯ÊýÖØÃû£¬¼´²»Ö§³Öº¯ÊýµÄÖØÔØ¡£µ«¿ÉÒÔ°üº¬Ä¬ÈϵIJÎÊý¡£
phpÖÐÒ²¿ÉÒÔÉùÃ÷Äܹ»½ÓÊտɱä²ÎÊýÊýÁ¿µÄº¯Êý£¬Í¨¹ýÈçÏÂÈý¸öº¯Êý£º
func_num_args()¡¢func_get_arg()ÒÔ¼°func_get_args()¡£
function var_args()
{
  echo "Number of parameters:";
  echo func_num_args();
  $args = func_get_args();
  foreach($args as $arg)
    echo $arg.'<br />';
}
php¾ßÓг¬¼¶È«¾Ö±äÁ¿£¬ÔÚÈκεط½¿É¼û¡£
ʹÓÃrequire()ºÍinclude()²¢²»Ó°Ïì×÷ÓÃÓò£¬±»°üº¬µÄÈ«¾Ö×÷ÓÃÓò±äÁ¿ÈÔÈ»¿ÉÓá£
¹Ø¼ü×Ö"global"¿ÉÒÔÓÃÀ´ÊÖ¶¯Ö¸¶¨ÔÚÒ»¸öº¯ÊýÖж¨Òå»òʹÓõıäÁ¿¾ßÓÐÈ«¾Ö×÷ÓÃÓò¡£
unset($var)¿ÉÒÔÊÖ¶¯É¾³ý±äÁ¿£¬ÔÚ´ËÖ®ºó¾Í²»ÄÜÔÙʹÓÃÁË¡£
phpº¯Êý²ÎÊýÒ²ÓГֵ´«µÝ”ºÍ“ÒýÓÔ´«µÝ¡£
function increment(&$value, $amount = 1){}
$value¾ÍÊÇÒýÓô«µÝ£¬$amount¾ÍÊÇÖµ´«µÝ¡£
return¿ÉÒÔÍ˳öº¯ÊýµÄÖ´ÐС£ Ò²¿ÉÒÔÓÃreturnÀ´´Óº¯ÊýÖзµ»ØÒ»¸öÖµ¡£
function larger


Ïà¹ØÎĵµ£º

MySQL 1067´íÎó½â¾ö·½·¨¼¯ºÏ

1
°²×°MYSQLºó¸ü¸ÄÁËROOTµÄÃÜÂëºóÓÃ
net startmysql
Æô¶¯Ê±ÎÒ¾ÍÓöµ½ÁËÕâÑùµÄÎÊÌ⣮ʹÓÃÒÔÏÂÃüÁîºó
c:\mysql\bin\mysqladmin-u root -p shutdown
ÔÙnet start mysql¾ÍûÓÐÕâ¸ö´íÎóÌáʾÁË!
*************
2
MySQLµÄ1067´íÎó
Q£ºÎÒµÄMysqlÅöµ½ÁË 1067 ´íÎó
´íÎóÐÅϢΪ£º
A system error has occurred. ......

PHP±ÈASPÓÅÐãµÄÆ߸öÀíÓÉ ÄÏÈý·½

ASPÊÇ΢Èí¹«Ë¾ÊµÏÖ¶¯Ì¬ÍøÒ³µÄÒ»ÖÖ¼¼Êõ¡£
ASPÖ§³ÖһЩ½Å±¾ÓïÑÔ£¬Ö÷ÒªÒÔVBScriptΪÖ÷¡£
ÓëASPÏà±È½Ï£¬Ä㻹¿ÉÒÔÑ¡ÔñÁíÒ»Öпª·ÅÔ´´úÂë±à³ÌÓïÑÔ——PHP£¬PHP¿ÉÒÔÔËÐÐÔÚ¶àÖÖ²Ù×÷ϵͳÏ£¬ÆäÖаüÀ¨LinuxºÍwindows¡£
ËäÈ»ASPÊÇÒ»ÖÖ²»´íµÄ¼¼Êõ£¬µ«´Ó³¤Ô¶¿¼ÂÇÎÒÏàÐÅPHPÔÚ½«À´µÄ¼¼ÊõÁìÓòÀï»áÓв»·²µÄ±íÏÖ¡£
ÎÒÈÏΪÓÐÆ߸ ......

phpѧϰ±Ê¼Ç£¨8£©:PHPº¯ÊýºÍ×Ô¶¨Ò庯Êý


1¡¢PHPº¯Êý½éÉÜ
PHPº¯Êý·ÖΪ£ºÏµÍ³ÄÚ²¿º¯Êý ºÍ ×Ô¶¨Ò庯Êý 
¸ñʽ£ºFunction($a1,$s2....){};
Àý×Ó£ºdate("Y-m-d");
          Md5("CHAUVET");
º¯ÊýµÄÓÅÔ½ÐÔ£º
A)¿ØÖƳÌÐòÉè¼ÆµÄ¸´ÔÓÐÔ
B)Ìá¸ßÈí¼þµÄ¿É¿¿ÐÔ
C)Ìá¸ßÈí¼þ¿ª·¢Ð§ÂÊ
D)Ìá¸ßÈí¼þµÄ¿É ......

phpÈëÃÅ½Ì³Ì ¾«¼ò°æ(¸½ÊÓƵ)

1¡¢Ç¶Èë·½·¨£º
ÀàËÆASPµÄ<%£¬PHP¿ÉÒÔÊÇ<?php»òÕßÊÇ<?£¬½áÊø·ûºÅÊÇ?>£¬µ±È»ÄúÒ²¿ÉÒÔ×Ô¼ºÖ¸¶¨¡£
2¡¢ÒýÓÃÎļþ£º
ÒýÓÃÎļþµÄ·½·¨ÓÐÁ½ÖÖ£ºrequire ¼° include¡£
require µÄʹÓ÷½·¨Èç require("MyRequireFile.php"); ¡£Õâ¸öº¯Êýͨ³£·ÅÔÚ PHP ³ÌÐòµÄ×îÇ°Ã棬PHP ³ÌÐòÔÚÖ´ÐÐÇ°£¬¾Í»áÏȶÁÈë require ËùÖ¸¶¨ÒýÈë ......

MySQLÊý¾Ý¿â±¸·ÝµÄ»ù´¡ÖªÊ¶´óÈ«

ƽʱÎÒÃÇÔÚʹÓÃMySQLÊý¾Ý¿âµÄʱºò¾­³£»áÒòΪ²Ù×÷ʧÎóÔì³ÉÊý¾Ý¶ªÊ§£¬MySQLÊý¾Ý¿â±¸·Ý¿ÉÒÔ°ïÖúÎÒÃDZÜÃâÓÉÓÚ¸÷ÖÖÔ­ÒòÔì³ÉµÄÊý¾Ý¶ªÊ§»ò×ÅÊý¾Ý¿âµÄÆäËûÎÊÌâ¡£
¡¡¡¡Ò»¡¢Êý¾Ý±¸·Ý½Ý¾¶
¡¡¡¡ÒòΪÕâ¸ö·½·¨Ã»Óеõ½¹Ù·½ÕýʽÎĵµµÄÑéÖ¤£¬ÎÒÃÇÔݳÆΪÊÔÑé°É¡£
¡¡¡¡Ä¿µÄ£º±¸·ÝhostAÖ÷»úÖÐÒ»¸öMySQLÊý¾Ý¿â±¸·ÝTestA£¬²¢»Ö¸´µ½µ½hostB»úÖÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ