×ðÁú¿­Ê±¹ÙÍøµÇ¼

thinkphp¹Ø±ÕÄ¿½ñÒ³Ãæ

ÔÚweb¿ª·¢ÖÐ £¬ÓÐʱ¼äÐèÒªÔÚthinkphpÖÐʵÏֹرÕÄ¿½ñÒ³ÃæµÄ¹¦Ð§¡£Õâ¸ö¹¦Ð§¿´ËƼòÆÓ £¬µ«ÊµÏÖÆðÀ´ÕÕ¾ÉÓÐһЩ¼¼ÇɵÄ¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚthinkphpÖÐʵÏֹرÕÄ¿½ñÒ³ÃæµÄ¹¦Ð§¡£

Ò»¡¢Ê¹ÓÃJavascriptʵÏֹرÕÒ³Ãæ

×î³£¼ûµÄ¹Ø±ÕÒ³ÃæµÄÒªÁì¾ÍÊÇʹÓÃJavascriptµÄwindow.close()º¯Êý¡£ÊµÏÖÈçÏ£º

<script type="text/javascript">
    window.close();
</script>

µÇ¼ºó¸´ÖÆ

¿ÉÊÇ £¬Ö±½ÓʹÓøú¯ÊýÔÚһЩä¯ÀÀÆ÷Ï»áÓÐÏÞÖÆ £¬ÀýÈçChrome»áÌáÐÑ¡°Õâ¸öÒ³ÃæÊÔͼ¹Ø±Õ´°¿Ú £¬ÊÇ·ñ¼ÌÐø£¿¡±¡£ÕâÊÇÓÉÓÚä¯ÀÀÆ÷ΪÁ˱ÜÃâ¶ñÒâÒ³Ãæ¹Ø±ÕÓû§µÄä¯ÀÀÆ÷ £¬¼ÓÈëÁËһЩÇå¾²»úÖÆ¡£

ÈôÊÇÒª×èÖ¹Õâ¸öÎÊÌâ £¬¿ÉÒÔ¸øÁ´½ÓÔöÌíÒ»¸ötarget=”_blank”ÊôÐÔ £¬ÕâÑùµã»÷Á´½Óºó»áпªÒ»¸ö´°¿Ú £¬ÔÚÕâ¸ö´°¿ÚÖÐÖ´ÐйرղÙ×÷¾Í¿ÉÒÔÁË¡£

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

¶þ¡¢Ê¹ÓÃPHPʵÏֹرÕÒ³Ãæ

ÈôÊÇ´°¿ÚÊÇͨ¹ýPHPµÄheaderº¯Êý·­¿ªµÄ £¬Ò²¿ÉÒÔʹÓÃPHPµÄheaderº¯ÊýÀ´ÊµÏֹرÕ¡£´úÂëÈçÏ£º

header("Content-Type: text/html; charset=utf-8");     
$closeHtml  = "<html>
";
$closeHtml .= "<head>
";
$closeHtml .= "<title>¹Ø±Õ´°¿Ú</title>
";
$closeHtml .= "<script type="text/javascript">
";
$closeHtml .= "window.close();
";
$closeHtml .= "</script>
";
$closeHtml .= "</head>
";
$closeHtml .= "<body>
";
$closeHtml .= "</body>
";
$closeHtml .= "</html>";
echo $closeHtml;

µÇ¼ºó¸´ÖÆ

ÕâÖÖÒªÁìµÄÀûÒæÊÇ¿ÉÒÔ×èÖ¹ä¯ÀÀÆ÷µÄÇå¾²»úÖÆÏÞÖÆ¡£¿ÉÊÇ £¬ÓÉÓÚÓÃÁËheaderº¯Êý £¬ÒÔÊDZØÐè°ü¹ÜÔÚÊä³öheaderǰûÓÐÊä³öÈκÎÄÚÈÝ £¬²»È»»á±¬·¢ÖÒÑÔ¡£

Èý¡¢Ê¹ÓÃURLʵÏֹرÕÒ³Ãæ

ÉÐÓÐÒ»ÖÖ·½·¨¾ÍÊÇʹÓÃURLÀ´ÊµÏֹرÕÄ¿½ñ´°¿ÚµÄ¹¦Ð§¡£ÏêϸҪÁìÊÇÔÚÒª¹Ø±ÕµÄ´°¿ÚÁ´½ÓÉÏÌí¼ÓÒ»¸öÌØÊâµÄURL £¬È»ºóÔÚ´°¿ÚÖмì²âµ½Õâ¸öURLʱ £¬¾ÍÖ´ÐйرղÙ×÷¡£´úÂëÈçÏ£º

<script type="text/javascript">
    if (window.location.search.indexOf('close=1') != -1) {
        window.opener = null;
        window.close(); 
    }
</script>

µÇ¼ºó¸´ÖÆ

ÕâÀïÎÒÃÇÔÚURLÖÐÌí¼ÓÁËÒ»¸öclose=1µÄ²ÎÊý £¬µ±¼ì²âµ½Õâ¸ö²ÎÊýʱ £¬¾ÍÖ´ÐйرղÙ×÷¡£¿ÉÊÇÕâÖÖÒªÁìÒ²ÓÐÒ»¶¨µÄÏÞÖÆ £¬ÀýÈçÓû§¿ÉÒÔÊÖ¶¯ÐÞ¸ÄURL £¬´Ó¶øÈƹý¹Ø±Õ²Ù×÷¡£

×ܽ᣺

ÒÔÉÏÊÇÈýÖÖʵÏÖThinkphp¹Ø±ÕÄ¿½ñÒ³ÃæµÄÒªÁì £¬Ã¿ÖÖÒªÁ춼ÓÐÆä¸÷×ÔµÄÓÅÈõµã¡£ÈôÊÇÊÇÐèÒª×èÖ¹ä¯ÀÀÆ÷µÄÇå¾²»úÖÆÏÞÖÆ £¬¿ÉÒÔʹÓÃPHPµÄheaderº¯Êý£»ÈôÊÇÊÇÐèÒª×èÖ¹Óû§ÊÖ¶¯ÐÞ¸ÄURL £¬¿ÉÒÔʹÓõÚÒ»ÖÖ»òµÚ¶þÖÖÒªÁì¡£Ò»Ñùƽ³£ÇéÐÎÏ £¬µÚÒ»ÖÖÒªÁìÒÑ×ã¹»Öª×ãÐèÇó¡£

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

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

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

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

QR code
ÍøÕ¾µØͼ