×ðÁú¿­Ê±

thinkphpÔõôÅþÁ¬html

thinkphpÊÇÒ»¸ö»ùÓÚmvcģʽµÄ¿ªÔ´php¿ò¼Ü£¬Ëü½ÓÄÉÁËÃæÏò¹¤¾ßµÄ±à³ÌÍ·ÄÔ£¬Ê¹µÃ¿ª·¢Ö°Ô±Äܹ»¿ìËÙ¸ßЧµØ¿ª·¢³öÇå¾²¿É¿¿µÄwebÓ¦ÓóÌÐò¡£ÔÚthinkphpÖУ¬ÅþÁ¬htmlÎļþ¿ÉÒÔͨ¹ýÄ£°åÒýÇæÀ´ÊµÏÖ¡£

Ä£°åÒýÇæÊÇÒ»ÖÖ½«ÄÚÈÝÓëÑùʽÊèÉ¢µÄÊÖÒÕ£¬Ëü½«HTML´úÂëºÍPHP´úÂëÍÑÀ룬ʹµÃÇ°¶Ë¿ª·¢Ö°Ô±ºÍºó¶Ë¿ª·¢Ö°Ô±¿ÉÒÔ¸÷×ÔרעÓÚ×Ô¼ºµÄÊÂÇ飬Ìá¸ßÁË¿ª·¢Ð§ÂʺʹúÂë¿Éά»¤ÐÔ¡£

ÅþÁ¬htmlÎļþµÄÏêϸ°ì·¨ÈçÏ£º

½¨ÉèÒ»¸öHTMLÎļþ£¬±àдҳÃæ½á¹¹ºÍÑùʽ£¬½«ÆäÉúÑÄÔÚÏîÄ¿µÄpublicĿ¼Ï£¬ÀýÈçÏîĿ·¾¶Îª¡°/var/www/html/demo¡±£¬Ôò¿ÉÒÔ½«HTMLÎļþÉúÑÄÔÚ¡°/var/www/html/demo/public/index.html¡±¡£

ÔÚThinkPHPÏîÄ¿Öн¨ÉèÒ»¸ö¿ØÖÆÆ÷£¬ÀýÈçÃüÃûΪIndexController¡£

ÔÚIndexControllerÖн¨ÉèÒ»¸öÒªÁ죬ÀýÈçÃüÃûΪindex£¬ÓÃÓÚäÖȾHTMLÄ£°åÎļþ¡£

ÔÚindexÒªÁìÖÐŲÓÿò¼ÜÄÚÖõÄÄ£°åÒýÇ棬ÔÚÄ£°åÖÐʹÓÃinclude±êÇ©ÒýÈëHTMLÎļþ¡£

ÏÂÃæÊÇÒ»¸öʾÀý´úÂ룺

<?php
namespace appindexcontroller;

use thinkController;

class Index extends Controller
{
    public function index()
    {
        return $this->fetch('public/index.html');
    }
}

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÊöʾÀý´úÂëÖУ¬ÎÒÃǽ¨ÉèÁËÒ»¸öIndex¿ØÖÆÆ÷£¬ÆäÖаüÀ¨Ò»¸öindexÒªÁ죬Õâ¸öÒªÁìͨ¹ý¿ò¼ÜÄÚÖõÄÄ£°åÒýÇæÀ´¼ÓÔØpublicÎļþ¼ÐϵÄindex.htmlÎļþ¡£ÆäÖÐfetchÒªÁì¿ÉÒÔ¶ÁÈ¡Ö¸¶¨Â·¾¶ÏµÄÄ£°åÎļþ£¬²¢·µ»Ø¾­ÓÉ´¦Öóͷ£ºóµÄHTML´úÂ룬¼´ÊµÏÖÁËÔÚHTMLÎļþÖÐǶÈëPHP´úÂë¡£

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

ÐèҪעÖصÄÊÇ£¬ÓÉÓÚHTMLÎļþºÍPHP´úÂë»®·ÖÉúÑÄÔÚ²î±ðµÄĿ¼Ï£¬ÒÔÊÇÔÚHTMLÎļþÖÐÒýÈëCSSºÍJavaScriptÎļþʱ£¬Â·¾¶ÐèҪƾ֤ÏêϸµÄÎļþλÖÃÀ´ÉèÖá£ÈôÊÇHTMLÎļþÖÐʹÓÃÁËÏà¶Ô·¾¶£¬»¹ÐèҪ˼Á¿µ½Ä£°åÒýÇæ¶ÔHTMLÎļþµÄ·¾¶×öÁËÒ»¶¨µÄ´¦Öóͷ££¬¿ÉÄÜ»áÓ°Ïìµ½×ÊÔ´ÎļþµÄ·¾¶¡£

ThinkPHP×÷Ϊһ¿îÓÅÒìµÄPHP¿ò¼Ü£¬ÌṩÁËÇ¿Ê¢µÄÄ£°åÒýÇæºÍ±ã½ÝµÄÎļþ²Ù×÷¹¦Ð§£¬Ê¹µÃÅþÁ¬HTMLÎļþ±äµÃÇáËÉ×ÔÈô¡£Ê¹ÓÃThinkPHP¿ª·¢WebÓ¦ÓóÌÐò£¬¿ª·¢Ö°Ô±¿ÉÒÔרעÓÚÓªÒµÂß¼­µÄʵÏÖ£¬Í¬Ê±°ü¹Ü´úÂëµÄ¿Éά»¤ÐԺͿÉÀ©Õ¹ÐÔ¡£

ÒÔÉϾÍÊÇthinkphpÔõôÅþÁ¬htmlµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

18523999891

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

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

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