<output id="pnccu"></output>
  • <dfn id="pnccu"><rp id="pnccu"><code id="pnccu"></code></rp></dfn>
  • <menu id="pnccu"></menu>
    \n    \n        上傳用戶:\n        上傳文件1:\n        上傳文件2:\n        \n    <\/form>\n  <\/body>\n<\/html><\/pre>

    message.jsp的代碼如下:<\/p>

    <%@ page language=\"java\" pageEncoding=\"UTF-8\"%>\n\n\n  \n    消息提示<\/title>\n  <\/head>\n  \n  <body>
    <h1><a href="http://ipnx.cn/">亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱</a></h1>\n        ${message}\n  <\/body>\n<\/html><\/pre><p>2.2、處理文件上傳的Servlet<\/p><p>UploadHandleServlet的代碼如下:<\/p><pre class='brush:php;toolbar:false;'>package me.gacl.web.controller;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport javax.servlet.ServletException;\nimport javax.servlet.http.HttpServlet;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\nimport org.apache.commons.fileupload.FileItem;\nimport org.apache.commons.fileupload.disk.DiskFileItemFactory;\nimport org.apache.commons.fileupload.servlet.ServletFileUpload;\n\npublic class UploadHandleServlet extends HttpServlet {\n\n    public void doGet(HttpServletRequest request, HttpServletResponse response)\n            throws ServletException, IOException {\n                \/\/得到上傳文件的保存目錄,將上傳的文件存放于WEB-INF目錄下,不允許外界直接訪問,保證上傳文件的安全\n                String savePath = this.getServletContext().getRealPath(\"\/WEB-INF\/upload\");\n                File file = new File(savePath);\n                \/\/判斷上傳文件的保存目錄是否存在\n                if (!file.exists() && !file.isDirectory()) {\n                    System.out.println(savePath+\"目錄不存在,需要創(chuàng)建\");\n                    \/\/創(chuàng)建目錄\n                    file.mkdir();\n                }\n                \/\/消息提示\n                String message = \"\";\n                try{\n                    \/\/使用Apache文件上傳組件處理文件上傳步驟:\n                    \/\/1、創(chuàng)建一個DiskFileItemFactory工廠\n                    DiskFileItemFactory factory = new DiskFileItemFactory();\n                    \/\/2、創(chuàng)建一個文件上傳解析器\n                    ServletFileUpload upload = new ServletFileUpload(factory);\n                     \/\/解決上傳文件名的中文亂碼\n                    upload.setHeaderEncoding(\"UTF-8\"); \n                    \/\/3、判斷提交上來的數(shù)據(jù)是否是上傳表單的數(shù)據(jù)\n                    if(!ServletFileUpload.isMultipartContent(request)){\n                        \/\/按照傳統(tǒng)方式獲取數(shù)據(jù)\n                        return;\n                    }\n                    \/\/4、使用ServletFileUpload解析器解析上傳數(shù)據(jù),解析結(jié)果返回的是一個List<FileItem>集合,每一個FileItem對應一個Form表單的輸入項\n                    List<FileItem> list = upload.parseRequest(request);\n                    for(FileItem item : list){\n                        \/\/如果fileitem中封裝的是普通輸入項的數(shù)據(jù)\n                        if(item.isFormField()){\n                            String name = item.getFieldName();\n                            \/\/解決普通輸入項的數(shù)據(jù)的中文亂碼問題\n                            String value = item.getString(\"UTF-8\");\n                            \/\/value = new String(value.getBytes(\"iso8859-1\"),\"UTF-8\");\n                            System.out.println(name + \"=\" + value);\n                        }else{\/\/如果fileitem中封裝的是上傳文件\n                            \/\/得到上傳的文件名稱,\n                            String filename = item.getName();\n                            System.out.println(filename);\n                            if(filename==null || filename.trim().equals(\"\")){\n                                continue;\n                            }\n                            \/\/注意:不同的瀏覽器提交的文件名是不一樣的,有些瀏覽器提交上來的文件名是帶有路徑的,如:  c:\\a\\b\\1.txt,而有些只是單純的文件名,如:1.txt\n                            \/\/處理獲取到的上傳文件的文件名的路徑部分,只保留文件名部分\n                            filename = filename.substring(filename.lastIndexOf(\"\\\\\")+1);\n                            \/\/獲取item中的上傳文件的輸入流\n                            InputStream in = item.getInputStream();\n                            \/\/創(chuàng)建一個文件輸出流\n                            FileOutputStream out = new FileOutputStream(savePath + \"\\\\\" + filename);\n                            \/\/創(chuàng)建一個緩沖區(qū)\n                            byte buffer[] = new byte[1024];\n                            \/\/判斷輸入流中的數(shù)據(jù)是否已經(jīng)讀完的標識\n                            int len = 0;\n                            \/\/循環(huán)將輸入流讀入到緩沖區(qū)當中,(len=in.read(buffer))>0就表示in里面還有數(shù)據(jù)\n                            while((len=in.read(buffer))>0){\n                                \/\/使用FileOutputStream輸出流將緩沖區(qū)的數(shù)據(jù)寫入到指定的目錄(savePath + \"\\\\\" + filename)當中\(zhòng)n                                out.write(buffer, 0, len);\n                            }\n                            \/\/關(guān)閉輸入流\n                            in.close();\n                            \/\/關(guān)閉輸出流\n                            out.close();\n                            \/\/刪除處理文件上傳時生成的臨時文件\n                            item.delete();\n                            message = \"文件上傳成功!\";\n                        }\n                    }\n                }catch (Exception e) {\n                    message= \"文件上傳失??!\";\n                    e.printStackTrace();\n                    \n                }\n                request.setAttribute(\"message\",message);\n                request.getRequestDispatcher(\"\/message.jsp\").forward(request, response);\n    }\n\n    public void doPost(HttpServletRequest request, HttpServletResponse response)\n            throws ServletException, IOException {\n\n        doGet(request, response);\n    }\n}<\/pre><p>在Web.xml文件中注冊UploadHandleServlet<\/p><pre class='brush:php;toolbar:false;'><servlet>\n    <servlet-name>UploadHandleServlet<\/servlet-name>\n    <servlet-class>me.gacl.web.controller.UploadHandleServlet<\/servlet-class>\n<\/servlet>\n\n<servlet-mapping>\n    <servlet-name>UploadHandleServlet<\/servlet-name>\n    <url-pattern>\/servlet\/UploadHandleServlet<\/url-pattern>\n<\/servlet-mapping><\/pre><p>文件上傳成功之后,上傳的文件保存在了WEB-INF目錄下的upload目錄,如下圖所示:<\/p>\n<p><img src=\"https:\/\/img.php.cn\/upload\/image\/678\/158\/650\/1573530602598078.jpg\" title=\"1573530602598078.jpg\" alt=\"java怎麼上傳文件\"><\/p>"}	</script>
    	
    <meta http-equiv="Cache-Control" content="no-transform" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <script>var V_PATH="/";window.onerror=function(){ return true; };</script>
    </head>
    
    <body data-commit-time="2023-12-28T14:50:12+08:00" class="editor_body body2_2">
    	<link rel="stylesheet" type="text/css" href="/static/csshw/stylehw.css">
    <header>
        <div   id="wjcelcm34c"   class="head">
            <div   id="wjcelcm34c"   class="haed_left">
                <div   id="wjcelcm34c"   class="haed_logo">
                    <a href="http://ipnx.cn/zh-tw/" title="" class="haed_logo_a">
                        <img src="/static/imghw/logo.png" alt="" class="haed_logoimg">
                    </a>
                </div>
                <div   id="wjcelcm34c"   class="head_nav">
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="社群" class="head_nava head_nava-template1">社群</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/zh-tw/article.html" title="文章" class="languagechoosea on">文章</a>
                                <a href="http://ipnx.cn/zh-tw/faq/zt" title="合集" class="languagechoosea">合集</a>
                                <a href="http://ipnx.cn/zh-tw/wenda.html" title="問答" class="languagechoosea">問答</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="學習" class="head_nava head_nava-template1_1">學習</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1_1" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/zh-tw/course.html" title="課程" class="languagechoosea on">課程</a>
                                <a href="http://ipnx.cn/zh-tw/dic/" title="程式設計字典" class="languagechoosea">程式設計字典</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="工具庫" class="head_nava head_nava-template1_2">工具庫</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1_2" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/zh-tw/toolset/development-tools" title="開發(fā)工具" class="languagechoosea on">開發(fā)工具</a>
                                <a href="http://ipnx.cn/zh-tw/toolset/website-source-code" title="網(wǎng)站源碼" class="languagechoosea">網(wǎng)站源碼</a>
                                <a href="http://ipnx.cn/zh-tw/toolset/php-libraries" title="PHP 函式庫" class="languagechoosea">PHP 函式庫</a>
                                <a href="http://ipnx.cn/zh-tw/toolset/js-special-effects" title="JS特效" class="languagechoosea on">JS特效</a>
                                <a href="http://ipnx.cn/zh-tw/toolset/website-materials" title="網(wǎng)站素材" class="languagechoosea on">網(wǎng)站素材</a>
                                <a href="http://ipnx.cn/zh-tw/toolset/extension-plug-ins" title="擴充插件" class="languagechoosea on">擴充插件</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="http://ipnx.cn/zh-tw/ai" title="AI工具" class="head_nava head_nava-template1_3">AI工具</a>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="休閒" class="head_nava head_nava-template1_3">休閒</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1_3" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/zh-tw/game" title="遊戲下載" class="languagechoosea on">遊戲下載</a>
                                <a href="http://ipnx.cn/zh-tw/mobile-game-tutorial/" title="遊戲教程" class="languagechoosea">遊戲教程</a>
    
                            </div>
                        </div>
                    </div>
                </div>
            </div>
                        <div   id="wjcelcm34c"   class="head_search">
                    <input id="key_words"  onkeydown="if (event.keyCode == 13) searchs('zh-tw')" class="search-input" type="text" autocomplete="off" name="keywords" required="required" placeholder="Block,address,transaction,news" value="">
                    <a href="javascript:;" title="搜尋"  onclick="searchs('zh-tw')"><img src="/static/imghw/find.png" alt="搜尋"></a>
                </div>
                    <div   id="wjcelcm34c"   class="head_right">
                <div   id="wjcelcm34c"   class="haed_language">
                    <a href="javascript:;" class="layui-btn haed_language_btn">繁體中文<i class="layui-icon layui-icon-triangle-d"></i></a>
                    <div   class="wjcelcm34c"   id="dropdown-template" style="display: none;">
                        <div   id="wjcelcm34c"   class="languagechoose">
                                                    <a href="javascript:setlang('zh-cn');" title="簡體中文" class="languagechoosea">簡體中文</a>
                                                    <a href="javascript:setlang('en');" title="English" class="languagechoosea">English</a>
                                                    <a href="javascript:;" title="繁體中文" class="languagechoosea">繁體中文</a>
                                                    <a href="javascript:setlang('ja');" title="日本語" class="languagechoosea">日本語</a>
                                                    <a href="javascript:setlang('ko');" title="???" class="languagechoosea">???</a>
                                                    <a href="javascript:setlang('ms');" title="Melayu" class="languagechoosea">Melayu</a>
                                                    <a href="javascript:setlang('fr');" title="Fran?ais" class="languagechoosea">Fran?ais</a>
                                                    <a href="javascript:setlang('de');" title="Deutsch" class="languagechoosea">Deutsch</a>
                                                </div>
                    </div>
                </div>
                <span id="wjcelcm34c"    class="head_right_line"></span>
                                <div style="display: block;" id="login" class="haed_login ">
                        <a href="javascript:;"  title="Login" class="haed_logina ">Login</a>
                    </div>
                    <div style="display: block;" id="reg" class="head_signup login">
                        <a href="javascript:;"  title="singup" class="head_signupa">singup</a>
                    </div>
                
            </div>
        </div>
    </header>
    
    	
    	<main>
    		<div   id="wjcelcm34c"   class="Article_Details_main">
    			<div   id="wjcelcm34c"   class="Article_Details_main1">
    							<div   id="wjcelcm34c"   class="Article_Details_main1M">
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainL1">
    						<a href="http://ipnx.cn/zh-tw/" title="首頁"
    							class="phpgenera_Details_mainL1a">首頁</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    												<a href="http://ipnx.cn/zh-tw/java/"
    							class="phpgenera_Details_mainL1a">Java</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    												<a href="http://ipnx.cn/zh-tw/java/base/"
    							class="phpgenera_Details_mainL1a">Java基礎(chǔ)</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    						<span>java怎麼上傳文件</span>
    					</div>
    					
    					<div   id="wjcelcm34c"   class="Articlelist_txts">
    						<div   id="wjcelcm34c"   class="Articlelist_txts_info">
    							<h1 class="Articlelist_txts_title">java怎麼上傳文件</h1>
    							<div   id="wjcelcm34c"   class="Articlelist_txts_info_head">
    								<div   id="wjcelcm34c"   class="author_info">
    									<a href="http://ipnx.cn/zh-tw/member/490068.html"  class="author_avatar">
    									<img class="lazy"  data-src="https://img.php.cn/upload/avatar/000/490/068/5d2bd4ed95560268.jpeg" src="/static/imghw/default1.png" alt="angryTom">
    									</a>
    									<div   id="wjcelcm34c"   class="author_detail">
    																			<a href="http://ipnx.cn/zh-tw/member/490068.html" class="author_name">angryTom</a>
                                    										</div>
    								</div>
                    			</div>
    							<span id="wjcelcm34c"    class="Articlelist_txts_time">Nov 12, 2019 am	 11:57 AM</span>
    															<div   id="wjcelcm34c"   class="Articlelist_txts_infos">
    																			<span id="wjcelcm34c"    class="Articlelist_txts_infoss on">java</span>
    																			<span id="wjcelcm34c"    class="Articlelist_txts_infoss ">上傳文件</span>
    																	</div>
    														
    						</div>
    					</div>
    					<hr />
    					<div   id="wjcelcm34c"   class="article_main php-article">
    						<div   id="wjcelcm34c"   class="article-list-left detail-content-wrap content">
    						<ins class="adsbygoogle"
    							style="display:block; text-align:center;"
    							data-ad-layout="in-article"
    							data-ad-format="fluid"
    							data-ad-client="ca-pub-5902227090019525"
    							data-ad-slot="3461856641">
    						</ins>
    						
    
    					<p>在Web應用系統(tǒng)開發(fā)中,文件上傳和下載功能是非常常用的功能,今天來講一下JavaWeb中的文件上傳功能的實現(xiàn)。</p>
    <p style="text-align: center;"><strong><img  src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/040/5dca2bf78a2aa477.jpg" class="lazy" alt="java怎麼上傳文件" ></strong></p>
    <p><strong>java怎么上傳文件</strong></p>
    <p>對于文件上傳,瀏覽器在上傳的過程中是將文件以流的形式提交到服務器端的,如果直接使用Servlet獲取上傳文件的輸入流然后再解析里面的請求參數(shù)是比較麻煩,所以一般選擇采用apache的開源工具common-fileupload這個文件上傳組件。這個common-fileupload上傳組件的jar包可以去apache官網(wǎng)上面下載,也可以在struts的lib文件夾下面找到,struts上傳的功能就是基于這個實現(xiàn)的。common-fileupload是依賴于common-io這個包的,所以還需要下載這個包。(推薦教程:<a href="http://ipnx.cn/java-article.html" target="_blank">java教程</a>)</p>
    <p><strong>一、開發(fā)環(huán)境搭建</strong></p>
    <p>創(chuàng)建一個FileUploadAndDownLoad項目,加入Apache的commons-fileupload文件上傳組件的相關(guān)Jar包,如下圖所示:</p>
    <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/image/722/419/214/1573530528206424.jpg" class="lazy" title="1573530528206424.jpg" alt="java怎麼上傳文件"></p>
    <p><strong>二、實現(xiàn)文件上傳</strong></p>
    <p>2.1、文件上傳頁面和消息提示頁面</p>
    <p>upload.jsp頁面的代碼如下:</p><pre class='brush:php;toolbar:false;'><%@ page language="java" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML>
    <html>
      <head>
        <title>文件上傳</title>
      </head>
      
      <body>
        <form action="${pageContext.request.contextPath}/servlet/UploadHandleServlet" enctype="multipart/form-data" method="post">
            上傳用戶:<input type="text" name="username"><br/>
            上傳文件1:<input type="file" name="file1"><br/>
            上傳文件2:<input type="file" name="file2"><br/>
            <input type="submit" value="提交">
        </form>
      </body>
    </html></pre><p>message.jsp的代碼如下:</p><pre class='brush:php;toolbar:false;'><%@ page language="java" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML>
    <html>
      <head>
        <title>消息提示</title>
      </head>
      
      <body>
            ${message}
      </body>
    </html></pre><p>2.2、處理文件上傳的Servlet</p><p>UploadHandleServlet的代碼如下:</p><pre class='brush:php;toolbar:false;'>package me.gacl.web.controller;
    
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.List;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.commons.fileupload.FileItem;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    
    public class UploadHandleServlet extends HttpServlet {
    
        public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
                    //得到上傳文件的保存目錄,將上傳的文件存放于WEB-INF目錄下,不允許外界直接訪問,保證上傳文件的安全
                    String savePath = this.getServletContext().getRealPath("/WEB-INF/upload");
                    File file = new File(savePath);
                    //判斷上傳文件的保存目錄是否存在
                    if (!file.exists() && !file.isDirectory()) {
                        System.out.println(savePath+"目錄不存在,需要創(chuàng)建");
                        //創(chuàng)建目錄
                        file.mkdir();
                    }
                    //消息提示
                    String message = "";
                    try{
                        //使用Apache文件上傳組件處理文件上傳步驟:
                        //1、創(chuàng)建一個DiskFileItemFactory工廠
                        DiskFileItemFactory factory = new DiskFileItemFactory();
                        //2、創(chuàng)建一個文件上傳解析器
                        ServletFileUpload upload = new ServletFileUpload(factory);
                         //解決上傳文件名的中文亂碼
                        upload.setHeaderEncoding("UTF-8"); 
                        //3、判斷提交上來的數(shù)據(jù)是否是上傳表單的數(shù)據(jù)
                        if(!ServletFileUpload.isMultipartContent(request)){
                            //按照傳統(tǒng)方式獲取數(shù)據(jù)
                            return;
                        }
                        //4、使用ServletFileUpload解析器解析上傳數(shù)據(jù),解析結(jié)果返回的是一個List<FileItem>集合,每一個FileItem對應一個Form表單的輸入項
                        List<FileItem> list = upload.parseRequest(request);
                        for(FileItem item : list){
                            //如果fileitem中封裝的是普通輸入項的數(shù)據(jù)
                            if(item.isFormField()){
                                String name = item.getFieldName();
                                //解決普通輸入項的數(shù)據(jù)的中文亂碼問題
                                String value = item.getString("UTF-8");
                                //value = new String(value.getBytes("iso8859-1"),"UTF-8");
                                System.out.println(name + "=" + value);
                            }else{//如果fileitem中封裝的是上傳文件
                                //得到上傳的文件名稱,
                                String filename = item.getName();
                                System.out.println(filename);
                                if(filename==null || filename.trim().equals("")){
                                    continue;
                                }
                                //注意:不同的瀏覽器提交的文件名是不一樣的,有些瀏覽器提交上來的文件名是帶有路徑的,如:  c:\a\b\1.txt,而有些只是單純的文件名,如:1.txt
                                //處理獲取到的上傳文件的文件名的路徑部分,只保留文件名部分
                                filename = filename.substring(filename.lastIndexOf("\\")+1);
                                //獲取item中的上傳文件的輸入流
                                InputStream in = item.getInputStream();
                                //創(chuàng)建一個文件輸出流
                                FileOutputStream out = new FileOutputStream(savePath + "\\" + filename);
                                //創(chuàng)建一個緩沖區(qū)
                                byte buffer[] = new byte[1024];
                                //判斷輸入流中的數(shù)據(jù)是否已經(jīng)讀完的標識
                                int len = 0;
                                //循環(huán)將輸入流讀入到緩沖區(qū)當中,(len=in.read(buffer))>0就表示in里面還有數(shù)據(jù)
                                while((len=in.read(buffer))>0){
                                    //使用FileOutputStream輸出流將緩沖區(qū)的數(shù)據(jù)寫入到指定的目錄(savePath + "\\" + filename)當中
                                    out.write(buffer, 0, len);
                                }
                                //關(guān)閉輸入流
                                in.close();
                                //關(guān)閉輸出流
                                out.close();
                                //刪除處理文件上傳時生成的臨時文件
                                item.delete();
                                message = "文件上傳成功!";
                            }
                        }
                    }catch (Exception e) {
                        message= "文件上傳失?。?quot;;
                        e.printStackTrace();
                        
                    }
                    request.setAttribute("message",message);
                    request.getRequestDispatcher("/message.jsp").forward(request, response);
        }
    
        public void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
    
            doGet(request, response);
        }
    }</pre><p>在Web.xml文件中注冊UploadHandleServlet</p><pre class='brush:php;toolbar:false;'><servlet>
        <servlet-name>UploadHandleServlet</servlet-name>
        <servlet-class>me.gacl.web.controller.UploadHandleServlet</servlet-class>
    </servlet>
    
    <servlet-mapping>
        <servlet-name>UploadHandleServlet</servlet-name>
        <url-pattern>/servlet/UploadHandleServlet</url-pattern>
    </servlet-mapping></pre><p>文件上傳成功之后,上傳的文件保存在了WEB-INF目錄下的upload目錄,如下圖所示:</p>
    <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/image/678/158/650/1573530602598078.jpg" class="lazy" title="1573530602598078.jpg" alt="java怎麼上傳文件"></p><p>以上是java怎麼上傳文件的詳細內(nèi)容。更多資訊請關(guān)注PHP中文網(wǎng)其他相關(guān)文章!</p>
    
    
    						</div>
    					</div>
    					<div   id="wjcelcm34c"   class="wzconShengming_sp">
    						<div   id="wjcelcm34c"   class="bzsmdiv_sp">本網(wǎng)站聲明</div>
    						<div>本文內(nèi)容由網(wǎng)友自願投稿,版權(quán)歸原作者所有。本站不承擔相應的法律責任。如發(fā)現(xiàn)涉嫌抄襲或侵權(quán)的內(nèi)容,請聯(lián)絡admin@php.cn</div>
    					</div>
    				</div>
    
    				<ins class="adsbygoogle"
         style="display:block"
         data-ad-format="autorelaxed"
         data-ad-client="ca-pub-5902227090019525"
         data-ad-slot="2507867629"></ins>
    
    
    
    				<div   id="wjcelcm34c"   class="AI_ToolDetails_main4sR">
    
    
    				<ins class="adsbygoogle"
            style="display:block"
            data-ad-client="ca-pub-5902227090019525"
            data-ad-slot="3653428331"
            data-ad-format="auto"
            data-full-width-responsive="true"></ins>
        
    
    
    					<!-- <div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
    						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									src="/static/imghw/hotarticle2.png" alt="" />
    								<h2>熱門文章</h2>
    							</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796832397.html" title="Grass Wonder Build Guide |烏瑪媽媽漂亮的德比" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide |烏瑪媽媽漂亮的德比</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 週前</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796833110.html" title="<??>:在森林裡99夜 - 所有徽章以及如何解鎖" class="phpgenera_Details_mainR4_bottom_title"><??>:在森林裡99夜 - 所有徽章以及如何解鎖</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 週前</span>
    										<span>By DDD</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796831605.html" title="烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)" class="phpgenera_Details_mainR4_bottom_title">烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 週前</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796836699.html" title="Rimworld Odyssey溫度指南和Gravtech" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey溫度指南和Gravtech</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 週前</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796831905.html" title="Windows安全是空白或不顯示選項" class="phpgenera_Details_mainR4_bottom_title">Windows安全是空白或不顯示選項</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 週前</span>
    										<span>By 下次還敢</span>
    									</div>
    								</div>
    														</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    								<a href="http://ipnx.cn/zh-tw/article.html">顯示更多</a>
    							</div>
    						</div>
    					</div> -->
    
    
    											<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    								<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/hottools2.png" alt="" />
    									<h2>熱AI工具</h2>
    								</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_bottom">
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title">
    													<h3>Undress AI Tool</h3>
    												</a>
    												<p>免費脫衣圖片</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title">
    													<h3>Undresser.AI Undress</h3>
    												</a>
    												<p>人工智慧驅(qū)動的應用程序,用於創(chuàng)建逼真的裸體照片</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title">
    													<h3>AI Clothes Remover</h3>
    												</a>
    												<p>用於從照片中去除衣服的線上人工智慧工具。</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title">
    													<h3>Clothoff.io</h3>
    												</a>
    												<p>AI脫衣器</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title">
    													<h3>Video Face Swap</h3>
    												</a>
    												<p>使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!</p>
    											</div>
    										</div>
    																</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    									<a href="http://ipnx.cn/zh-tw/ai">顯示更多</a>
    								</div>
    							</div>
    						</div>
    					
    
    
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
    						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									src="/static/imghw/hotarticle2.png" alt="" />
    								<h2>熱門文章</h2>
    							</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796832397.html" title="Grass Wonder Build Guide |烏瑪媽媽漂亮的德比" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide |烏瑪媽媽漂亮的德比</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 週前</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796833110.html" title="<??>:在森林裡99夜 - 所有徽章以及如何解鎖" class="phpgenera_Details_mainR4_bottom_title"><??>:在森林裡99夜 - 所有徽章以及如何解鎖</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 週前</span>
    										<span>By DDD</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796831605.html" title="烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)" class="phpgenera_Details_mainR4_bottom_title">烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 週前</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796836699.html" title="Rimworld Odyssey溫度指南和Gravtech" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey溫度指南和Gravtech</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 週前</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/1796831905.html" title="Windows安全是空白或不顯示選項" class="phpgenera_Details_mainR4_bottom_title">Windows安全是空白或不顯示選項</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 週前</span>
    										<span>By 下次還敢</span>
    									</div>
    								</div>
    														</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    								<a href="http://ipnx.cn/zh-tw/article.html">顯示更多</a>
    							</div>
    						</div>
    					</div>
    
    
    											<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    								<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/hottools2.png" alt="" />
    									<h2>熱工具</h2>
    								</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_bottom">
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="記事本++7.3.1" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_title">
    													<h3>記事本++7.3.1</h3>
    												</a>
    												<p>好用且免費的程式碼編輯器</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3漢化版" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_title">
    													<h3>SublimeText3漢化版</h3>
    												</a>
    												<p>中文版,非常好用</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="禪工作室 13.0.1" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_title">
    													<h3>禪工作室 13.0.1</h3>
    												</a>
    												<p>強大的PHP整合開發(fā)環(huán)境</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title">
    													<h3>Dreamweaver CS6</h3>
    												</a>
    												<p>視覺化網(wǎng)頁開發(fā)工具</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac版" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_title">
    													<h3>SublimeText3 Mac版</h3>
    												</a>
    												<p>神級程式碼編輯軟體(SublimeText3)</p>
    											</div>
    										</div>
    																	</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    									<a href="http://ipnx.cn/zh-tw/ai">顯示更多</a>
    								</div>
    							</div>
    						</div>
    										
    
    					
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
    						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									src="/static/imghw/hotarticle2.png" alt="" />
    								<h2>熱門話題</h2>
    							</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/laravel-tutori" title="Laravel 教程" class="phpgenera_Details_mainR4_bottom_title">Laravel 教程</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1597</span>
    										</div>
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>29</span>
    										</div>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/zh-tw/faq/php-tutorial" title="PHP教程" class="phpgenera_Details_mainR4_bottom_title">PHP教程</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1488</span>
    										</div>
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>72</span>
    										</div>
    									</div>
    								</div>
    														</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    								<a href="http://ipnx.cn/zh-tw/faq/zt">顯示更多</a>
    							</div>
    						</div>
    					</div>
    				</div>
    			</div>
    							<div   id="wjcelcm34c"   class="Article_Details_main2">
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainL4">
    						<div   id="wjcelcm34c"   class="phpmain1_2_top">
    							<a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img
    									src="/static/imghw/index2_title2.png" alt="" /></a>
    						</div>
    						<div   id="wjcelcm34c"   class="phpgenera_Details_mainL4_info">
    
    													<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796853961.html" title="VSCODE設置。 JSON位置" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175399996276197.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="VSCODE設置。 JSON位置" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796853961.html" title="VSCODE設置。 JSON位置" class="phphistorical_Version2_mids_title">VSCODE設置。 JSON位置</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 01, 2025 am	 06:12 AM</span>
    								<p class="Articlelist_txts_p">settings.json文件位於用戶級或工作區(qū)級路徑,用於自定義VSCode設置。 1.用戶級路徑:Windows為C:\Users\\AppData\Roaming\Code\User\settings.json,macOS為/Users//Library/ApplicationSupport/Code/User/settings.json,Linux為/home//.config/Code/User/settings.json;2.工作區(qū)級路徑:項目根目錄下的.vscode/settings</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796855228.html" title="如何使用JDBC處理Java的交易?" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175410894189634.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="如何使用JDBC處理Java的交易?" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796855228.html" title="如何使用JDBC處理Java的交易?" class="phphistorical_Version2_mids_title">如何使用JDBC處理Java的交易?</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 02, 2025 pm	 12:29 PM</span>
    								<p class="Articlelist_txts_p">要正確處理JDBC事務,必須先關(guān)閉自動提交模式,再執(zhí)行多個操作,最後根據(jù)結(jié)果提交或回滾;1.調(diào)用conn.setAutoCommit(false)以開始事務;2.執(zhí)行多個SQL操作,如INSERT和UPDATE;3.若所有操作成功則調(diào)用conn.commit(),若發(fā)生異常則調(diào)用conn.rollback()確保數(shù)據(jù)一致性;同時應使用try-with-resources管理資源,妥善處理異常並關(guān)閉連接,避免連接洩漏;此外建議使用連接池、設置保存點實現(xiàn)部分回滾,並保持事務盡可能短以提升性能。</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796853906.html" title="在Java的掌握依賴注入春季和Guice" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175399880187055.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="在Java的掌握依賴注入春季和Guice" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796853906.html" title="在Java的掌握依賴注入春季和Guice" class="phphistorical_Version2_mids_title">在Java的掌握依賴注入春季和Guice</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 01, 2025 am	 05:53 AM</span>
    								<p class="Articlelist_txts_p">依賴性(di)IsadesignpatternwhereObjectsReceivedenciesenciesExtern上,推廣looseSecouplingAndEaseerTestingThroughConstructor,setter,orfieldInjection.2.springfraMefringframeWorkSannotationsLikeLikeLike@component@component,@component,@service,@autowiredwithjava-service和@autowiredwithjava-ligatiredwithjava-lase-lightike</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796852916.html" title="Python Itertools組合示例" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175392679036414.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Python Itertools組合示例" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796852916.html" title="Python Itertools組合示例" class="phphistorical_Version2_mids_title">Python Itertools組合示例</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 31, 2025 am	 09:53 AM</span>
    								<p class="Articlelist_txts_p">itertools.combinations用於生成從可迭代對像中選取指定數(shù)量元素的所有不重複組合(順序無關(guān)),其用法包括:1.從列表中選2個元素組合,如('A','B')、('A','C')等,避免重複順序;2.對字符串取3個字符組合,如"abc"、"abd",適用於子序列生成;3.求兩數(shù)之和等於目標值的組合,如1 5=6,簡化雙重循環(huán)邏輯;組合與排列的區(qū)別在於順序是否重要,combinations視AB與BA為相同,而permutations視為不同;</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796852888.html" title="Python Pytest夾具示例" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175392573149545.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Python Pytest夾具示例" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796852888.html" title="Python Pytest夾具示例" class="phphistorical_Version2_mids_title">Python Pytest夾具示例</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 31, 2025 am	 09:35 AM</span>
    								<p class="Articlelist_txts_p">fixture是用於為測試提供預設環(huán)境或數(shù)據(jù)的函數(shù),1.使用@pytest.fixture裝飾器定義fixture;2.在測試函數(shù)中以參數(shù)形式註入fixture;3.yield之前執(zhí)行setup,之後執(zhí)行teardown;4.通過scope參數(shù)控製作用域,如function、module等;5.將共用fixture放在conftest.py中實現(xiàn)跨文件共享,從而提升測試的可維護性和復用性。</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796854018.html" title="了解Java虛擬機(JVM)內(nèi)部" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175400107034897.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="了解Java虛擬機(JVM)內(nèi)部" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796854018.html" title="了解Java虛擬機(JVM)內(nèi)部" class="phphistorical_Version2_mids_title">了解Java虛擬機(JVM)內(nèi)部</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 01, 2025 am	 06:31 AM</span>
    								<p class="Articlelist_txts_p">TheJVMenablesJava’s"writeonce,runanywhere"capabilitybyexecutingbytecodethroughfourmaincomponents:1.TheClassLoaderSubsystemloads,links,andinitializes.classfilesusingbootstrap,extension,andapplicationclassloaders,ensuringsecureandlazyclassloa</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796854595.html" title="如何使用Java的日曆?" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175407348140593.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="如何使用Java的日曆?" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796854595.html" title="如何使用Java的日曆?" class="phphistorical_Version2_mids_title">如何使用Java的日曆?</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 02, 2025 am	 02:38 AM</span>
    								<p class="Articlelist_txts_p">使用java.time包中的類替代舊的Date和Calendar類;2.通過LocalDate、LocalDateTime和LocalTime獲取當前日期時間;3.使用of()方法創(chuàng)建特定日期時間;4.利用plus/minus方法不可變地增減時間;5.使用ZonedDateTime和ZoneId處理時區(qū);6.通過DateTimeFormatter格式化和解析日期字符串;7.必要時通過Instant與舊日期類型兼容;現(xiàn)代Java中日期處理應優(yōu)先使用java.timeAPI,它提供了清晰、不可變且線</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/zh-tw/faq/1796853834.html" title="Google Chrome無法打開本地文件" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175399709053955.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Google Chrome無法打開本地文件" />
    								</a>
    								<a href="http://ipnx.cn/zh-tw/faq/1796853834.html" title="Google Chrome無法打開本地文件" class="phphistorical_Version2_mids_title">Google Chrome無法打開本地文件</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 01, 2025 am	 05:24 AM</span>
    								<p class="Articlelist_txts_p">ChromecanopenlocalfileslikeHTMLandPDFsbyusing"Openfile"ordraggingthemintothebrowser;ensuretheaddressstartswithfile:///;2.SecurityrestrictionsblockAJAX,localStorage,andcross-folderaccessonfile://;usealocalserverlikepython-mhttp.server8000tor</p>
    							</div>
    													</div>
    
    													<a href="http://ipnx.cn/zh-tw/java/" class="phpgenera_Details_mainL4_botton">
    								<span>See all articles</span>
    								<img src="/static/imghw/down_right.png" alt="" />
    							</a>
    											</div>
    				</div>
    					</div>
    	</main>
    	<footer>
        <div   id="wjcelcm34c"   class="footer">
            <div   id="wjcelcm34c"   class="footertop">
                <img src="/static/imghw/logo.png" alt="">
                <p>公益線上PHP培訓,幫助PHP學習者快速成長!</p>
            </div>
            <div   id="wjcelcm34c"   class="footermid">
                <a href="http://ipnx.cn/zh-tw/about/us.html">關(guān)於我們</a>
                <a href="http://ipnx.cn/zh-tw/about/disclaimer.html">免責聲明</a>
                <a href="http://ipnx.cn/zh-tw/update/article_0_1.html">Sitemap</a>
            </div>
            <div   id="wjcelcm34c"   class="footerbottom">
                <p>
                    ? php.cn All rights reserved
                </p>
            </div>
        </div>
    </footer>
    
    <input type="hidden" id="verifycode" value="/captcha.html">
    
    
    
    
    		<link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' />
    	
    	
    	
    	
    	
    
    	
    	
    
    
    
    
    
    
    <footer>
    <div class="friendship-link">
    <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p>
    <a href="http://ipnx.cn/" title="亚洲国产日韩欧美一区二区三区">亚洲国产日韩欧美一区二区三区</a>
    
    <div class="friend-links">
    
    
    </div>
    </div>
    
    </footer>
    
    
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
    </body><div id="pzlhz" class="pl_css_ganrao" style="display: none;"><tt id="pzlhz"><form id="pzlhz"><listing id="pzlhz"></listing></form></tt><li id="pzlhz"><code id="pzlhz"></code></li><center id="pzlhz"><delect id="pzlhz"><optgroup id="pzlhz"></optgroup></delect></center><strike id="pzlhz"></strike><abbr id="pzlhz"></abbr><nav id="pzlhz"><rt id="pzlhz"><ins id="pzlhz"></ins></rt></nav><li id="pzlhz"><code id="pzlhz"></code></li><acronym id="pzlhz"></acronym><legend id="pzlhz"><cite id="pzlhz"></cite></legend><legend id="pzlhz"></legend><tr id="pzlhz"></tr><output id="pzlhz"></output><tr id="pzlhz"><center id="pzlhz"><nobr id="pzlhz"><optgroup id="pzlhz"></optgroup></nobr></center></tr><fieldset id="pzlhz"></fieldset><pre id="pzlhz"><thead id="pzlhz"><meter id="pzlhz"></meter></thead></pre><font id="pzlhz"><tr id="pzlhz"><button id="pzlhz"><var id="pzlhz"></var></button></tr></font><progress id="pzlhz"></progress><em id="pzlhz"></em><menuitem id="pzlhz"><tr id="pzlhz"></tr></menuitem><tbody id="pzlhz"><p id="pzlhz"><ol id="pzlhz"><tr id="pzlhz"></tr></ol></p></tbody><meter id="pzlhz"></meter><video id="pzlhz"></video><u id="pzlhz"></u><output id="pzlhz"><tt id="pzlhz"><form id="pzlhz"></form></tt></output><track id="pzlhz"></track><dfn id="pzlhz"></dfn></noscript><delect id="pzlhz"><sup id="pzlhz"><label id="pzlhz"></label></sup></delect><table id="pzlhz"><object id="pzlhz"></object></table><th id="pzlhz"></th><form id="pzlhz"></form><object id="pzlhz"></object><dfn id="pzlhz"></dfn><tt id="pzlhz"><dl id="pzlhz"></dl></tt><progress id="pzlhz"><i id="pzlhz"></i></progress><nav id="pzlhz"><rt id="pzlhz"><address id="pzlhz"></address></rt></nav><strike id="pzlhz"><fieldset id="pzlhz"><legend id="pzlhz"><noframes id="pzlhz"></noframes></legend></fieldset></strike><meter id="pzlhz"></meter><input id="pzlhz"><tr id="pzlhz"></tr></input><meter id="pzlhz"><sup id="pzlhz"></sup></meter><thead id="pzlhz"></thead><pre id="pzlhz"><nobr id="pzlhz"></nobr></pre><fieldset id="pzlhz"></fieldset><optgroup id="pzlhz"></optgroup><output id="pzlhz"><mark id="pzlhz"></mark></output><form id="pzlhz"></form><rt id="pzlhz"><dd id="pzlhz"><form id="pzlhz"><pre id="pzlhz"></pre></form></dd></rt><u id="pzlhz"></u><del id="pzlhz"><nav id="pzlhz"></nav></del><th id="pzlhz"></th><b id="pzlhz"></b><tbody id="pzlhz"></tbody><blockquote id="pzlhz"></blockquote><dd id="pzlhz"></dd><track id="pzlhz"><var id="pzlhz"><pre id="pzlhz"></pre></var></track><sup id="pzlhz"></sup><th id="pzlhz"></th><button id="pzlhz"><big id="pzlhz"><ins id="pzlhz"></ins></big></button><big id="pzlhz"><del id="pzlhz"><pre id="pzlhz"></pre></del></big><kbd id="pzlhz"><em id="pzlhz"><u id="pzlhz"></u></em></kbd><th id="pzlhz"><strong id="pzlhz"><strike id="pzlhz"><td id="pzlhz"></td></strike></strong></th><p id="pzlhz"><dd id="pzlhz"><form id="pzlhz"></form></dd></p><tbody id="pzlhz"></tbody><big id="pzlhz"><form id="pzlhz"><em id="pzlhz"><abbr id="pzlhz"></abbr></em></form></big><tt id="pzlhz"><tfoot id="pzlhz"><address id="pzlhz"></address></tfoot></tt><input id="pzlhz"><tr id="pzlhz"><div id="pzlhz"></div></tr></input><kbd id="pzlhz"><pre id="pzlhz"><dfn id="pzlhz"></dfn></pre></kbd><legend id="pzlhz"><center id="pzlhz"></center></legend><dl id="pzlhz"><address id="pzlhz"></address></dl><pre id="pzlhz"><nobr id="pzlhz"><dl id="pzlhz"><s id="pzlhz"></s></dl></nobr></pre><legend id="pzlhz"></legend><center id="pzlhz"></center><strong id="pzlhz"><progress id="pzlhz"><output id="pzlhz"><tt id="pzlhz"></tt></output></progress></strong><track id="pzlhz"></track><menu id="pzlhz"><span id="pzlhz"></span></menu><s id="pzlhz"></s><style id="pzlhz"><optgroup id="pzlhz"><acronym id="pzlhz"><sub id="pzlhz"></sub></acronym></optgroup></style><strong id="pzlhz"><object id="pzlhz"><menuitem id="pzlhz"><acronym id="pzlhz"></acronym></menuitem></object></strong><td id="pzlhz"></td><sup id="pzlhz"></sup><legend id="pzlhz"></legend><pre id="pzlhz"><var id="pzlhz"><tfoot id="pzlhz"><ins id="pzlhz"></ins></tfoot></var></pre><span id="pzlhz"><thead id="pzlhz"><wbr id="pzlhz"></wbr></thead></span><rp id="pzlhz"></rp><video id="pzlhz"><dfn id="pzlhz"><label id="pzlhz"></label></dfn></video><dfn id="pzlhz"><sup id="pzlhz"><code id="pzlhz"><legend id="pzlhz"></legend></code></sup></dfn><td id="pzlhz"></td><p id="pzlhz"><thead id="pzlhz"><meter id="pzlhz"></meter></thead></p><pre id="pzlhz"><cite id="pzlhz"><dd id="pzlhz"><small id="pzlhz"></small></dd></cite></pre><source id="pzlhz"></source><bdo id="pzlhz"><label id="pzlhz"><strong id="pzlhz"></strong></label></bdo><input id="pzlhz"></input><table id="pzlhz"><pre id="pzlhz"></pre></table><listing id="pzlhz"></listing><div id="pzlhz"><label id="pzlhz"></label></div><fieldset id="pzlhz"></fieldset><mark id="pzlhz"><strong id="pzlhz"><label id="pzlhz"></label></strong></mark><style id="pzlhz"></style><legend id="pzlhz"><noframes id="pzlhz"><label id="pzlhz"></label></noframes></legend><wbr id="pzlhz"><strike id="pzlhz"><mark id="pzlhz"></mark></strike></wbr><meter id="pzlhz"><menuitem id="pzlhz"><option id="pzlhz"><tr id="pzlhz"></tr></option></menuitem></meter><th id="pzlhz"><i id="pzlhz"><del id="pzlhz"></del></i></th><ul id="pzlhz"></ul><meter id="pzlhz"><del id="pzlhz"><b id="pzlhz"><em id="pzlhz"></em></b></del></meter><abbr id="pzlhz"><dl id="pzlhz"></dl></abbr><td id="pzlhz"></td><div id="pzlhz"></div><thead id="pzlhz"><dd id="pzlhz"><sub id="pzlhz"><center id="pzlhz"></center></sub></dd></thead><strong id="pzlhz"></strong><abbr id="pzlhz"></abbr><sup id="pzlhz"></sup><small id="pzlhz"></small><form id="pzlhz"></form><div id="pzlhz"></div><small id="pzlhz"></small><progress id="pzlhz"></progress><strong id="pzlhz"><nav id="pzlhz"><th id="pzlhz"><kbd id="pzlhz"></kbd></th></nav></strong><small id="pzlhz"></small><blockquote id="pzlhz"></blockquote><legend id="pzlhz"></legend><td id="pzlhz"></td><dfn id="pzlhz"></dfn><progress id="pzlhz"></progress><center id="pzlhz"></center><kbd id="pzlhz"><samp id="pzlhz"></samp></kbd><div id="pzlhz"><thead id="pzlhz"><font id="pzlhz"><pre id="pzlhz"></pre></font></thead></div><tbody id="pzlhz"><label id="pzlhz"></label></tbody><small id="pzlhz"><dfn id="pzlhz"></dfn></small><form id="pzlhz"></form><tr id="pzlhz"></tr><pre id="pzlhz"><kbd id="pzlhz"><listing id="pzlhz"></listing></kbd></pre><bdo id="pzlhz"><code id="pzlhz"><legend id="pzlhz"><xmp id="pzlhz"></xmp></legend></code></bdo><tt id="pzlhz"></tt><output id="pzlhz"><big id="pzlhz"></big></output><em id="pzlhz"></em><wbr id="pzlhz"><blockquote id="pzlhz"></blockquote></wbr><font id="pzlhz"><small id="pzlhz"></small></font><tfoot id="pzlhz"></tfoot><dfn id="pzlhz"></dfn><del id="pzlhz"><var id="pzlhz"><strong id="pzlhz"></strong></var></del><ul id="pzlhz"></ul><tt id="pzlhz"></tt><td id="pzlhz"></td><small id="pzlhz"><dfn id="pzlhz"></dfn></small><input id="pzlhz"><sup id="pzlhz"><strike id="pzlhz"><big id="pzlhz"></big></strike></sup></input><progress id="pzlhz"><ul id="pzlhz"><u id="pzlhz"></u></ul></progress><bdo id="pzlhz"><i id="pzlhz"><s id="pzlhz"></s></i></bdo><div id="pzlhz"></div><abbr id="pzlhz"><input id="pzlhz"><dl id="pzlhz"><acronym id="pzlhz"></acronym></dl></input></abbr></div>
    
    </html>