尊龙凯时人生就是博

thinkphpÖг£ÓõÄÒýÈëÉèÖÃÓÐÄÄЩ

Ò»¡¢ÒýÈëÎļþ

ΪÁËʹÓÃThinkPHP¿ò¼ÜÌṩµÄ¹¦Ð§ £¬ÎÒÃÇÐèÒª½«¿ò¼ÜÄÚµÄһЩÀà¿âÒýÈëµ½ÎÒÃǵijÌÐòÖС£ÔÚThinkPHPÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÁ½ÖÖ·½·¨¾ÙÐÐÎļþÒýÈë¡£

ÒýÈë¿ò¼ÜĬÈÏÎļþ

¿ò¼ÜĬÈÏÎļþ±»´æ´¢ÔÚframeworkĿ¼Ï £¬ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏ·½·¨¾ÙÐÐÒýÈ룺

Á¬Ã¦Ñ§Ï°¡°PHPÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»

require_once 'framework/thinkphp.php';

µÇ¼ºó¸´ÖÆ

ÕâÑù¾Í»á½«¿ò¼ÜĬÈÏÎļþÒýÈ뵽Ŀ½ñÎļþÖÐ £¬Àû±ãÎÒÃÇʹÓÿò¼ÜµÄ¹¦Ð§¡£

ÒýÈëÖ¸¶¨µÄÎļþ

ÓÐʱ¼äÎÒÃÇÖ»ÐèÒªÒýÈëÌض¨µÄÎļþ £¬¶ø²»±Ø°áÈëÕû¸ö¿ò¼Üµ½ÎÒÃǵijÌÐòÖС£ÔÚThinkPHPÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏ·½·¨¾ÙÐÐÒýÈ룺

require_once 'path/filename.php';

µÇ¼ºó¸´ÖÆ

ÕâÀïµÄpathÊÇÖ¸ÎÒÃÇÐèÒªÒýÈëµÄÎļþËùÔڵķ¾¶ £¬filenameÔòÊÇÎļþÃû £¬ÐèÒª°üÀ¨ÎļþÀ©Õ¹Ãû¡£

¶þ¡¢ÉèÖ÷ÓÉ

ÔÚThinkPHPÖÐ £¬ÎÒÃÇ¿ÉÒÔͨ¹ý½ç˵·ÓɹæÔò £¬½«ÇëÇó·¢Ë͵½Ö¸¶¨µÄ¿ØÖÆÆ÷ºÍ²Ù×÷ÖÐ £¬ÒÔµÖ´ï×Ô½ç˵URLµÄÄ¿µÄ¡£ÔÚThinkPHPÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏ´úÂë¾ÙÐзÓÉÉèÖãº

'URL_ROUTER_ON'   => true, // ¿ªÆô·ÓÉ
'URL_ROUTE_RULES'=>array( //½ç˵·ÓɹæÔò
    'user/:id'=>'user/show',
),

µÇ¼ºó¸´ÖÆ

ÕâÀïµÄ’user/:id’=>’user/show’ÌåÏÖ½«ËùÓÐ/user/idµÄÇëÇ󶼷¢Ë͵½user¿ØÖÆÆ÷µÄshow²Ù×÷ÖС£Õë¶Ô·ÓÉÉèÖà £¬ÎÒÃÇ¿ÉÒÔ½èÖúÕýÔò±í´ïʽµÈÆäËû·½·¨ £¬Ê¹Æä¸ü¾ßµ¯ÐÔµØÉ趨·ÓɹæÔò¡£

Èý¡¢ÉèÖÃÊý¾Ý¿â

ΪÁ˾ÙÐÐÏà¹Ø²Ù×÷ £¬ÎÒÃÇÐèÒªÅþÁ¬Êý¾Ý¿âÀ´¿ª·¢ThinkPHP³ÌÐò¡£ÔÚThinkPHPÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏ´úÂë¾ÙÐÐÊý¾Ý¿âÉèÖãº

'DB_TYPE'=> 'mysql', // Êý¾Ý¿âÀàÐÍ
'DB_HOST'=> 'localhost', // ЧÀÍÆ÷µØµã
'DB_NAME'=>'test', // Êý¾Ý¿âÃû
'DB_USER'=>'root', // ̞
'DB_PWD'=>'123456', // ÃÜÂë
'DB_PORT'=>'3306', // ¶Ë¿Ú
'DB_PREFIX'=>'think_', // Êý¾Ý¿â±íǰ׺

µÇ¼ºó¸´ÖÆ

ÕâÀïµÄDB_TYPEÌåÏÖÊý¾Ý¿âÀàÐÍ £¬DB_HOSTÌåÏÖЧÀÍÆ÷µØµã £¬DB_NAMEÌåÏÖÊý¾Ý¿âÃû £¬DB_USERÌåÏÖÊý¾Ý¿âÓû§Ãû £¬DB_PWDÌåÏÖÊý¾Ý¿âÃÜÂë £¬DB_PORTÌåÏÖÊý¾Ý¿â¶Ë¿Ú £¬DB_PREFIXÌåÏÖÊý¾Ý¿â±íǰ׺¡£ÎÒÃÇ¿ÉÒÔƾ֤ÏÖÕæÏàÐÎÐÞ¸ÄÉÏÊö²ÎÊý¡£

ËÄ¡¢ÉèÖÃÄ£°åÒýÇæ

ʹÓÃÄ£°åÒýÇæ¿ÉÒÔÔÚThinkPHPÖн«Êý¾ÝʵÏÖ¶¯Ì¬äÖȾµ½ÍøÒ³ÖС£ÒÔÏ´úÂë¿ÉÔÚThinkPHPÖÐʹÓÃÀ´¾ÙÐÐÄ£°åÒýÇæÉèÖãº

'TMPL_PARSE_STRING'=>array(
    '__PUBLIC__'=>__ROOT__.'/Public',
    '__JS__'=>__ROOT__.'/Public/js',
    '__CSS__'=>__ROOT__.'/Public/css',
    '__IMG__'=>__ROOT__.'/Public/img'
),

µÇ¼ºó¸´ÖÆ

ÕâÀïµÄ__PUBLIC__ £¬__JS__ £¬__CSS__ £¬__IMG__ÌåÏÖÏîÄ¿ÖÐʹÓõĹ«¹²Ä¿Â¼ £¬JSĿ¼ £¬CSSĿ¼ºÍͼÏñĿ¼ £¬ÎÒÃÇ¿ÉÒÔƾ֤ÏÖÕæÏàÐξÙÐÐÐ޸ġ£Ï»®Ïß__ROOT__ÔòÊÇÖ¸ÏîÄ¿µÄ¸ùĿ¼¡£

ÒÔÉϾÍÊÇthinkphpÖг£ÓõÄÒýÈëÉèÖÃÓÐÄÄЩµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ