×ðÁú¿­Ê±

thinkphpÔõôʵÏÖÒ³ÃæµÄË¢ÐÂ

Ò»¡¢Ò³ÃæˢеĻù±¾¼ÄÒå

ÔÚÍøÕ¾¿ª·¢Àú³ÌÖÐ £¬Ò³ÃæË¢ÐÂͨ³£ÊÇÖ¸»ùÓÚÄ¿½ñÒ³ÃæÖØмÓÔØÒ³Ãæ¡£Ë¢Ðºó £¬ÖØлñÈ¡Êý¾Ý £¬¸üÐÂÒ³Ãæչʾ¡£Ò³ÃæË¢ÐÂÒ»Ñùƽ³£·ÖΪÁ½Àࣺǰ¶Ëˢкͺó¶ËˢС£

Ë¢ÐÂÇ°¶ËÒ³Ãæ¿ÉÒÔͨ¹ýÇ°¶ËÊÖÒÕ £¬ºÃ±ÈJavaScript¡¢HTMLºÍCSS £¬ÊµÏÖÒ³ÃæÊÖ¶¯»ò×Ô¶¯Ë¢Ð¡£ÊµÏÖºó¶ËË¢ÐÂͨ³£ÐèÒª±àдºó¶Ë¾ç±¾»òÔËÓÃajaxµÈÊÖÒÕ £¬ÔÚЧÀÍÆ÷¶Ë¾ÙÐвÙ×÷¡£

¶þ¡¢thinkphpÖÐÇ°¶ËË¢ÐÂʵÏÖÒªÁì

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

ÔÚthinkphpÖÐʵÏÖÇ°¶ËˢоÍÏ൱¼òÆÓÁË¡£ÓÃjQueryµÄload()ÒªÁì¾ÍÄÜʵÏÖ¾Ö²¿Ë¢Ð¡£

<script type="text/javascript">
$(document).ready(function() {
    $("#refreshBtn").click(function(){
        $("#data").load(location.href+" #data>*","");
    });
});
</script>

µÇ¼ºó¸´ÖÆ

ÐèҪˢÐÂÇøÓòµÄidΪdata £¬Ë¢Ð°´Å¥µÄidΪrefreshBtn¡£µã»÷ˢа´Å¥ºó £¬Í¨¹ýjQueryµÄload()ÒªÁì £¬ÖØлñÈ¡Ä¿½ñurlÖÐdataÇøÓòµÄÄÚÈÝ £¬²¢ÇÒ½«ÆäÏÔʾÔÚÒ³ÃæÖÐ £¬´Ó¶øʵÏÖÒ³ÃæµÄˢС£

Èý¡¢thinkphpÖкó¶ËË¢ÐÂʵÏÖÒªÁì

ÔÚthinkphpÖÐʵÏÖºó¶ËˢР£¬¿ÉÒÔʹÓÃÁ½ÖÖÒªÁìʵÏÖ£º

1.ʹÓÃÔ­ÉúPHPµÄheader()º¯Êý

ͨ¹ýheader()º¯Êý½«Ò³ÃæÖض¨Ïòµ½Ä¿½ñÒ³Ãæ £¬´Ó¶øʵÏÖÒ³ÃæµÄˢС£

header("Location:".$_SERVER['REQUEST_URI']);

µÇ¼ºó¸´ÖÆ

ÕâÀïʹÓÃÁË$_SERVER[‘REQUEST_URI’]»ñÈ¡ÁËÄ¿½ñÇëÇóµÄurl·¾¶ £¬´Ó¶øʵÏÖÁËÒ³ÃæµÄÖض¨Ïò £¬ÊµÏÖÁËÒ³ÃæµÄˢС£

2.ʹÓÃthinkphp·â×°µÄredirect()º¯Êý

redirect()º¯ÊýÊÇthinkphp·â×°µÄÒ³ÃæÌøתº¯Êý £¬¿ÉÒÔʵÏÖÒ³ÃæµÄÖض¨ÏòºÍÒ³Ãæ²ÎÊýת´ïµÈ¹¦Ð§¡£

return $this->redirect($_SERVER['REQUEST_URI']);

µÇ¼ºó¸´ÖÆ

ÔÚ´Ë´¦Ê¹ÓÃÁËthinkphp·â×°µÄredirect()º¯Êý £¬À´ÊµÏÖÒ³ÃæµÄˢС£»¹¿ÉÒÔƾ֤ÐèҪת´ïparams²ÎÊý £¬ÒÔ´¦Öóͷ£Ìض¨µÄÓªÒµÂß¼­¡£

ËÄ¡¢³£¼ûÎÊÌâÓë½â¾öÒªÁì

ˢкó·ºÆðÖظ´Ìá½»ÎÊÌâ

·ºÆðÕâÖÖÎÊÌâµÄÖ÷ÒªÔµ¹ÊÔ­ÓÉÊÇÓÉÓÚÓû§ÔÚÌá½»±íµ¥Ê± £¬ä¯ÀÀÆ÷½«±íµ¥Êý¾Ý´æ´¢ÔÚ»º´æÖÐ £¬µ±Óû§Ë¢ÐÂÒ³Ãæʱ £¬ä¯ÀÀÆ÷½«»á×Ô¶¯Öظ´Ìá½»±íµ¥Êý¾Ý¡£

±íµ¥µÄTokenÑéÖ¤¿ÉÒÔͨ¹ýʹÓÃCookie»òSessionÀ´ÊµÏÖ¡£ÏêϸҪÁì¿ÉÒԲο¼CSRF¹¥»÷Óë·ÀÓù¡£

ajaxË¢ÐÂÒ³ÃæÎÞЧ

·ºÆðÕâÖÖÎÊÌâµÄÔµ¹ÊÔ­ÓÉ¿ÉÄÜÊÇajaxµÄ»º´æ»úÖƵ¼ÖÂÒ³ÃæÎÞ·¨Ë¢Ð¡£

½â¾öÒªÁ죺ÔÚajaxÇëÇóÖмÓÈëcache: falseÊôÐÔ £¬Õ¥È¡ajax»º´æ¡£

ÒÔÉϾÍÊÇthinkphpÔõôʵÏÖÒ³ÃæµÄˢеÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

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