목차
Nginx 로드 스케줄러+ 듀얼 Tomcat 로드 및 세션 복제 + MySQL 백엔드 데이터베이스
[root@192 ~]#firewall-cmd --add-port=45564/udp --permanent
mysql> testdata에서 * 선택;
백엔드 개발 PHP 튜토리얼 Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스

Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스

Jul 07, 2018 pm 04:43 PM
mysql nginx tomcat

이 글에서는 주로 Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스를 소개합니다. 이제는 필요한 친구들이 참고할 수 있도록 공유합니다.

Nginx 로드 스케줄러+ 듀얼 Tomcat 로드 및 세션 복제 + MySQL 백엔드 데이터베이스

환경:

从nginx官网下载最新版
wget http://nginx.org/download/nginx-1.13.9.tar.gz
로그인 후 복사
[root@192 ~]# yum -y install pcre-devel zlib-devel gcc gcc-c++ make[root@192 ~]# cd /usr/src/nginx- 1.13.9/
IP Function
192.168.2.5 nginx
192.1 6 8.2.6 tomcat1
192.168. 2.7 tomcat2 080, 3306, selinux ② nginx 설치
[root@192 ~]# useradd -M -s /sbin/nologin nginx [root @192 ~]# tar zxf nginx-1.13.9.tar.gz -C /usr/src
[root@192 nginx -1.13.9]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module && make && make install

[root@192 ~]# ln - s /usr/local/nginx/sbin/nginx /usr/local/sbin

nginx를 시작하지 마세요

③설치용 Tomcat 호스트 두 개

jdk从官网下载需要许可,允许之后下载至本地,导入主机
tomcat从官网downloads找到tomcat7.0或者更高版本
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.86/bin/apache-tomcat-7.0.86.tar.gz
로그인 후 복사
[root@192 ~]# tar zxf jdk-7u65-linux -x64.gz -C /usr/src

[root@192 ~]# tar zxf apache-tomcat-7.0.54.tar.gz -C /usr/src

[root@192 ~]# mv jdk1.7.0_65/ /usr/local/java

[root@192 ~]# mv apache-tomcat-7.0.54/ /usr/local/tomcat7

[root@192 ~ ]# vim /etc/profile

export JAVA_HOME=/usr/local/java
export CATALINA_HOME=/usr/local/tomcat7
export PATH=$JAVA_HOME/bin:$CATALINA_HOME/bin:$PATH
로그인 후 복사
[root@192 ~]# 소스 /etc/profile

[root@192 ~]# java -version

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
로그인 후 복사
[root@192 ~]# catalina.sh 버전

Using CATALINA_BASE:   /usr/local/tomcat7
Using CATALINA_HOME:   /usr/local/tomcat7
Using CATALINA_TMPDIR: /usr/local/tomcat7/temp
Using JRE_HOME:        /usr/local/java
Using CLASSPATH:       /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.
Server built:   May 19 2014 10:26:15
Server number:  7.0.86.0
OS Name:        Linux
OS Version:     3.10.0-327.el7.x86_64
Architecture:   amd64
JVM Version:    1.7.0_65-b17
JVM Vendor:     Oracle Corporation
로그인 후 복사
Tomcat 시작

[root@192 ~] # /usr/local/tomcat7/bin/startup.sh

Using CATALINA_BASE:   /usr/local/tomcat7
Using CATALINA_HOME:   /usr/local/tomcat7
Using CATALINA_TMPDIR: /usr/local/tomcat7/temp
Using JRE_HOME:        /usr/local/java
Using CLASSPATH:       /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar
Tomcat started.
로그인 후 복사

테스트 접속

http://192.168.2.6:8080

http://192.168.2.7:8080

4두 개의 호스트에서 Tomcat 구성 파일 수정

[root@192 ~]#cd /usr/local/tomcat7/conf

[root@192 ~]#cp server.xml server.xml.bak

[root@192 ~ ]#vim server.xml

.......
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat-1">
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context docBase="/web/webapp1" path="" reloadable="true"/>
로그인 후 복사

[root@192 ~]#mkdir -p /web/webapp1

[root@192 ~]#vim /web/webapp1/index.jsp

<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
 <head>
<title>tomcat-1</title>
 </head>
<body>
 <h1><font color="red">Session serviced by tomcat</font></h1>
<table aligh="center" border="1">
<tr>
 <td>Session ID</td>
     <td><%=session.getId()%></td>
<% session.setAttribute("abc","abc");%>
      </tr>
<tr>
<td>Create on</td>
<td><%= session.getCreationTime() %></td>
</tr>
   </table>
</body>
</html>
로그인 후 복사
Tomcat 다시 시작

[root@ 192 ~]#shutdown.sh

[ root@192 ~]#startup.sh

참고: 두 번째 호스트는 server.xml의 jvmRoute="tomcat-2"와 tomcat-2</에서 다릅니다. title><p> in index.jsp <br></p>테스트 접속 결과 두 Tomcat 호스트의 세션 ID가 다른 것으로 나타나 준비 작업이 완료되었습니다<p></p>http://192.168.2.6:8080<p>http://192.168.2.7 :8008</p> <p>두 번째, 세션 공유 구성</p> <p>단계:</p> <p>①두 호스트가 세션 공유 클러스터 구성<br>[root@192 ~]#vim /usr/local/tomcat7/conf/server.xml<br></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">....... <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat-1">       <!--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) -->       <!-- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>       -->       <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">          <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/>          <Channel className="org.apache.catal ina.tribes.group.GroupChannel">             <Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/>             <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="192.168.2.5" port="4000" autoBind="100" selectorTimeout="5000" maxThreads="6"/>             <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">               <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>             </Sender>             <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>             <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>           </Channel>           <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>           <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>   <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer" temDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/>   <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>       <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>     </Cluster>   <!-- Use the LockOutRealm to prevent attempts to guess user passwords via a brute-force attack -->   <Realm className="org.apache.catalina.realm.LockOutRealm">     <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase". Any edits that are performed against this UserDatabase are immediately available for use by the Realm. -->     <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>   </Realm>   <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">     <Context docBase="/web/webapp1" path="" reloadable="true"/></pre><div class="contentsignin">로그인 후 복사</div></div>[root@192 ~ ]#mkdir /web/webapp1/WEB-INF<p> <strong>[root@192 ~]#cp /usr/local/tomcat7/conf/web.xml WEB-INF/</strong></p>[root@192 ~]#vim WEB-INF /web.xml<p></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <distributable/>  #添加这个单词,必须有这一步,否则用户的session没法使用</pre><div class="contentsignin">로그인 후 복사</div></div> <blockquote>방화벽이 켜져 있으면 다음을 활성화하세요 <br> </blockquote> <h2 id="root-firewall-cmd-add-port-udp-permanent">[root@192 ~]#firewall-cmd --add-port=45564/udp --permanent</h2> <p></p>[root@192 ~]#firewall-cmd --add-port=4000/tcp --permanent<p> <br></p>[root@192 ~]#firewall-cmd --reload<p></p> <p>Tomcat 다시 시작</p>[root@192 ~]#shutdown.sh <p>[root@192 ~]#startup.sh</p> <p><em>참고: 두 Tomcat 구성은 동일합니다. 수신자 섹션에서 두 번째 호스트의 IP 주소를 가리키기만 하면 됩니다</em><br><em>②nginx 구성</em>[root@192 ~] #vim /usr/local/nginx/conf/nginx.conf<br></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">....... http {  ....... upstream tomcat_server {         server 192.168.2.6:8080 weight=1;         server 192.168.2.7:8080 weight=1;   }     #gzip  on;     server {         listen       80;         server_name  localhost;         #charset koi8-r;         #access_log  logs/host.access.log  main;         location / {             root   html;             index  index.html index.htm;             proxy_pass http://tomcat_server;         }</pre><div class="contentsignin">로그인 후 복사</div></div> <em> nginx를 시작하고 nginx 주소를 방문한 후 페이지를 새로 고쳐 액세스를 테스트하세요 </em><br>[root@192 ~]#nginx<em></em>http://192.168.2.5 <p>3. mysql 데이터베이스에 연결합니다. <br><br>단계: </p> <p>1mysql을 데이터베이스 서버로 사용하고 mysql을 구성합니다. <strong>mysql>다음으로 식별되는 </strong>.</p>에 대한 모든 권한을 부여합니다. '123.com';<p><br>mysql> 데이터베이스 생성 javatest</p> <p>mysql>javatest</p> 사용 <p>mysql>테이블 testdata 생성(id int not null auto_increment 기본 키,foo varchar(25),bar varchar(10));</p> <blockquote> mysql>testdata(foo,bar) 값에 삽입('hello','123.com ') </blockquote> <h2 id="mysql-gt-testdata에서-선택">mysql> testdata에서 * 선택;</h2> <p>②下载mysql-connector-java-5.1.22-bin.jar 复制到tomcat7/lib/目录下(两台tomcat都需要配置)<br>[root@192 ~]# cp mysql-connector-java-5.1.22-bin.jar /usr/local/tomcat7/lib/</p> <p>③配置context.xml<br>[root@192 ~]# cp /usr/local/tomcat7/conf/context.xml /usr/local/tomcat7/conf/context.xml.bak</p> <p>[root@192 ~]# vim /usr/local/tomcat7/conf/context.xml</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><Context>     <!-- Default set of monitored resources -->     <WatchedResource>WEB-INF/web.xml</WatchedResource>     <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="javauser" password="123.com" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://192.168.2.8:3306/javatest"/></pre><div class="contentsignin">로그인 후 복사</div></div> <p>④配置web.xml<br>[root@192 ~]# vim /web/webapp1/web.xml</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">...... <distributable/> <description>MySQL Test App</description>  <resource-ref>     <description>DB Connection</description>     <res-ref-name>jdbc/TestDB</res-ref-name>     <res-type>javax.sql.DataSource</res-type>     <res-auth>Container</res-auth>  </resource-ref></pre><div class="contentsignin">로그인 후 복사</div></div> <p>⑤编写连接数据库jsp文件<br>[root@192 ~]# vim /web/webapp1/test.jsp</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><%@ page language="java" import="java.sql.*" pageEncoding="GB2312"%> <html>   <head>     <title>MySQL</title>   </head> <body> connect MySQL<br> <% String driverClass="com.mysql.jdbc.Driver"; String url="jdbc:mysql://192.168.2.8:3306/javatest"; String username = "javauser"; String password = "123.com"; Class.forName(driverClass); Connection conn=DriverManager.getConnection(url, username, password); Statement stmt=conn.createStatement(); ResultSet rs = stmt.executeQuery("select * from testdata"); while(rs.next()){  out.println("<br>foo:"+rs.getString(2)+"bar:"+rs.getString(3)); } rs.close(); stmt.close(); conn.close(); %> </body></html></pre><div class="contentsignin">로그인 후 복사</div></div> <p>⑥重启tomcat,测试连接<br>[root@192 ~]# shutdown.sh<br>[root@192 ~]# startup.sh</p> <blockquote>http://192.168.2.5/test.jsp</blockquote> <p>以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!</p> <p>相关推荐:</p> <p class="comments-box-content"><a title="ThinkPHP5.0 Linux Apache/Nginx重写URL配置" href="http://www.php.cn/php-weizijiaocheng-406204.html" target="_blank">ThinkPHP5.0 Linux Apache/Nginx重写URL配置</a><br></p> <p class="mt20 ad-detail-mm hidden-xs"><a title="使用cronolog切割nginx访问日志,定时清理旧日志" href="http://www.php.cn/php-weizijiaocheng-406203.html" target="_blank">使用cronolog切割nginx访问日志,定时清理旧日志</a><br></p><p>위 내용은 Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!</p> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">본 웹사이트의 성명</div> <div>본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 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> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div 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> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div 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 class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796797907.html" title="<garden> : 정원 재배 - 완전한 돌연변이 가이드" class="phpgenera_Details_mainR4_bottom_title"><garden> : 정원 재배 - 완전한 돌연변이 가이드</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796797130.html" title="<gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법" class="phpgenera_Details_mainR4_bottom_title"><gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796796926.html" title="Nordhold : Fusion System, 설명" class="phpgenera_Details_mainR4_bottom_title">Nordhold : Fusion System, 설명</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796797896.html" title="Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 몇 주 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796801628.html" title="Clair Abscur : 원정 33 UE-Sandfall 게임 충돌? 3 가지 방법!" class="phpgenera_Details_mainR4_bottom_title">Clair Abscur : 원정 33 UE-Sandfall 게임 충돌? 3 가지 방법!</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div 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 class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>사실적인 누드 사진을 만들기 위한 AI 기반 앱</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>사진에서 옷을 제거하는 온라인 AI 도구입니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>무료로 이미지를 벗다</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>AI 옷 제거제</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title"> <h3>Video Face Swap</h3> </a> <p>완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div 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 class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796797907.html" title="<garden> : 정원 재배 - 완전한 돌연변이 가이드" class="phpgenera_Details_mainR4_bottom_title"><garden> : 정원 재배 - 완전한 돌연변이 가이드</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796797130.html" title="<gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법" class="phpgenera_Details_mainR4_bottom_title"><gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796796926.html" title="Nordhold : Fusion System, 설명" class="phpgenera_Details_mainR4_bottom_title">Nordhold : Fusion System, 설명</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796797896.html" title="Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 몇 주 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796801628.html" title="Clair Abscur : 원정 33 UE-Sandfall 게임 충돌? 3 가지 방법!" class="phpgenera_Details_mainR4_bottom_title">Clair Abscur : 원정 33 UE-Sandfall 게임 충돌? 3 가지 방법!</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div 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 class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/92" title="메모장++7.3.1" class="phpmain_tab2_mids_title"> <h3>메모장++7.3.1</h3> </a> <p>사용하기 쉬운 무료 코드 편집기</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/93" title="SublimeText3 중국어 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 중국어 버전</h3> </a> <p>중국어 버전, 사용하기 매우 쉽습니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/121" title="스튜디오 13.0.1 보내기" class="phpmain_tab2_mids_title"> <h3>스튜디오 13.0.1 보내기</h3> </a> <p>강력한 PHP 통합 개발 환경</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 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="드림위버 CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 CS6" class="phpmain_tab2_mids_title"> <h3>드림위버 CS6</h3> </a> <p>시각적 웹 개발 도구</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/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 class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/500" title="SublimeText3 Mac 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac 버전</h3> </a> <p>신 수준의 코드 편집 소프트웨어(SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div 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 class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/java-tutorial" title="자바 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">자바 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1677</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>14</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/cakephp-tutor" title="Cakephp 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">Cakephp 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1431</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>52</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/laravel-tutori" title="라라벨 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">라라벨 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1334</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>25</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/php-tutorial" title="PHP 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">PHP 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1280</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>29</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/c-tutorial" title="C# 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">C# 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1257</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>24</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/faq/zt">더보기</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div 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 class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796800127.html" title="MySQL 및 Phpmyadmin : 핵심 기능 및 기능" 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/174525193248938.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="MySQL 및 Phpmyadmin : 핵심 기능 및 기능" /> </a> <a href="https://www.php.cn/ko/faq/1796800127.html" title="MySQL 및 Phpmyadmin : 핵심 기능 및 기능" class="phphistorical_Version2_mids_title">MySQL 및 Phpmyadmin : 핵심 기능 및 기능</a> <span class="Articlelist_txts_time">Apr 22, 2025 am 12:12 AM</span> <p class="Articlelist_txts_p">MySQL 및 Phpmyadmin은 강력한 데이터베이스 관리 도구입니다. 1) MySQL은 데이터베이스 및 테이블을 작성하고 DML 및 SQL 쿼리를 실행하는 데 사용됩니다. 2) PHPMYADMIN은 데이터베이스 관리, 테이블 구조 관리, 데이터 운영 및 사용자 권한 관리에 직관적 인 인터페이스를 제공합니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796801351.html" title="MySQL에서 외국 키의 목적을 설명하십시오." 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/174551147048195.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="MySQL에서 외국 키의 목적을 설명하십시오." /> </a> <a href="https://www.php.cn/ko/faq/1796801351.html" title="MySQL에서 외국 키의 목적을 설명하십시오." class="phphistorical_Version2_mids_title">MySQL에서 외국 키의 목적을 설명하십시오.</a> <span class="Articlelist_txts_time">Apr 25, 2025 am 12:17 AM</span> <p class="Articlelist_txts_p">MySQL에서 외국 키의 기능은 테이블 간의 관계를 설정하고 데이터의 일관성과 무결성을 보장하는 것입니다. 외국 키는 참조 무결성 검사 및 계단식 작업을 통해 데이터의 효과를 유지합니다. 성능 최적화에주의를 기울이고 사용할 때 일반적인 오류를 피하십시오.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796801662.html" title="MySQL 및 Mariadb를 비교하고 대조하십시오." 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/174559730122300.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="MySQL 및 Mariadb를 비교하고 대조하십시오." /> </a> <a href="https://www.php.cn/ko/faq/1796801662.html" title="MySQL 및 Mariadb를 비교하고 대조하십시오." class="phphistorical_Version2_mids_title">MySQL 및 Mariadb를 비교하고 대조하십시오.</a> <span class="Articlelist_txts_time">Apr 26, 2025 am 12:08 AM</span> <p class="Articlelist_txts_p">MySQL과 Mariadb의 주요 차이점은 성능, 기능 및 라이센스입니다. 1. MySQL은 Oracle에 의해 개발되었으며 Mariadb는 포크입니다. 2. MariaDB는 높은 하중 환경에서 더 나은 성능을 발휘할 수 있습니다. 3. Mariadb는 더 많은 스토리지 엔진과 기능을 제공합니다. 4.MySQL은 듀얼 라이센스를 채택하고 MariaDB는 완전히 오픈 소스입니다. 선택할 때 기존 인프라, 성능 요구 사항, 기능 요구 사항 및 라이센스 비용을 고려해야합니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796802885.html" title="MySQL : 데이터베이스, phpmyadmin : 관리 인터페이스" 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/174585867195574.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="MySQL : 데이터베이스, phpmyadmin : 관리 인터페이스" /> </a> <a href="https://www.php.cn/ko/faq/1796802885.html" title="MySQL : 데이터베이스, phpmyadmin : 관리 인터페이스" class="phphistorical_Version2_mids_title">MySQL : 데이터베이스, phpmyadmin : 관리 인터페이스</a> <span class="Articlelist_txts_time">Apr 29, 2025 am 12:44 AM</span> <p class="Articlelist_txts_p">MySQL 및 Phpmyadmin은 다음 단계를 통해 효과적으로 관리 할 수 ​​있습니다. 1. 데이터베이스 작성 및 삭제 : Phpmyadmin을 클릭하여 완료하십시오. 2. 테이블 관리 : 테이블을 만들고 구조를 수정하고 인덱스를 추가 할 수 있습니다. 3. 데이터 작동 : 삽입, 업데이트, 데이터 삭제 및 SQL 쿼리 실행을 지원합니다. 4. 가져 오기 및 내보내기 데이터 : SQL, CSV, XML 및 기타 형식을 지원합니다. 5. 최적화 및 모니터링 : 최적화 가능한 명령을 사용하여 테이블을 최적화하고 쿼리 분석기 및 모니터링 도구를 사용하여 성능 문제를 해결하십시오.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796800888.html" title="SQL vs. MySQL : 둘 사이의 관계를 명확히합니다" 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/174542413280336.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="SQL vs. MySQL : 둘 사이의 관계를 명확히합니다" /> </a> <a href="https://www.php.cn/ko/faq/1796800888.html" title="SQL vs. MySQL : 둘 사이의 관계를 명확히합니다" class="phphistorical_Version2_mids_title">SQL vs. MySQL : 둘 사이의 관계를 명확히합니다</a> <span class="Articlelist_txts_time">Apr 24, 2025 am 12:02 AM</span> <p class="Articlelist_txts_p">SQL은 관계형 데이터베이스를 관리하는 표준 언어이며 MySQL은 SQL을 사용하는 데이터베이스 관리 시스템입니다. SQL은 CRUD 작업을 포함한 데이터베이스와 상호 작용하는 방법을 정의하는 반면 MySQL은 SQL 표준을 구현하고 저장 프로 시저 및 트리거와 같은 추가 기능을 제공합니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796801639.html" title="Nginx 및 Apache : 주요 차이점 이해" 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/174559686366654.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Nginx 및 Apache : 주요 차이점 이해" /> </a> <a href="https://www.php.cn/ko/faq/1796801639.html" title="Nginx 및 Apache : 주요 차이점 이해" class="phphistorical_Version2_mids_title">Nginx 및 Apache : 주요 차이점 이해</a> <span class="Articlelist_txts_time">Apr 26, 2025 am 12:01 AM</span> <p class="Articlelist_txts_p">Nginx와 Apache는 각각 고유 한 장점과 단점이 있으며 선택은 특정 요구에 기초해야합니다. 1.NGINX는 비동기 비 블로킹 아키텍처로 인해 높은 동시 시나리오에 적합합니다. 2. Apache는 모듈 식 설계로 인해 복잡한 구성이 필요한 저소성 시나리오에 적합합니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796803086.html" title="MACOS 시스템에서 MySQL의 설치 단계에 대한 자세한 설명" 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/503/042/174485575155088.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="MACOS 시스템에서 MySQL의 설치 단계에 대한 자세한 설명" /> </a> <a href="https://www.php.cn/ko/faq/1796803086.html" title="MACOS 시스템에서 MySQL의 설치 단계에 대한 자세한 설명" class="phphistorical_Version2_mids_title">MACOS 시스템에서 MySQL의 설치 단계에 대한 자세한 설명</a> <span class="Articlelist_txts_time">Apr 29, 2025 pm 03:36 PM</span> <p class="Articlelist_txts_p">MacOS에 MySQL을 설치하는 것은 다음 단계를 통해 달성 할 수 있습니다. 1. 1. 명령 /bin/bash-c"$(curl-fsslhttps://raw.githubusercontent.com/homebrew/install/head/install.sh)를 사용하여 Homebrew 설치 ". 2. 홈 브루를 업데이트하고 Brewupdate를 사용하십시오. 3. MySQL을 설치하고 BrewinStallMysQL을 사용하십시오. 4. MySQL 서비스를 시작하고 BrewServicessTartMysql을 사용하십시오. 설치 후 MySQL-U를 사용할 수 있습니다</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796803103.html" title="MySQL 테이블에 필드를 추가 및 삭제하는 단계" 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/503/042/174363984489880.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="MySQL 테이블에 필드를 추가 및 삭제하는 단계" /> </a> <a href="https://www.php.cn/ko/faq/1796803103.html" title="MySQL 테이블에 필드를 추가 및 삭제하는 단계" class="phphistorical_Version2_mids_title">MySQL 테이블에 필드를 추가 및 삭제하는 단계</a> <span class="Articlelist_txts_time">Apr 29, 2025 pm 04:15 PM</span> <p class="Articlelist_txts_p">MySQL에서는 altertabletable_nameaddcolumnnew_columnvarchar (255) 이후에 필드를 추가하여 altertabletable_namedropcolumncolumn_to_drop을 사용하여 필드를 삭제합니다. 필드를 추가 할 때는 쿼리 성능 및 데이터 구조를 최적화하기위한 위치를 지정해야합니다. 필드를 삭제하기 전에 작업이 돌이킬 수 없는지 확인해야합니다. 온라인 DDL, 백업 데이터, 테스트 환경 및 저하 기간을 사용하여 테이블 구조 수정은 성능 최적화 및 모범 사례입니다.</p> </div> </div> <a href="https://www.php.cn/ko/be/" 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 class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!</p> </div> <div class="footermid"> <a href="https://www.php.cn/ko/about/us.html">회사 소개</a> <a href="https://www.php.cn/ko/about/disclaimer.html">부인 성명</a> <a href="https://www.php.cn/ko/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1747379369"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> <script> document.addEventListener('DOMContentLoaded', function() { const mainNav = document.querySelector('.Article_Details_main1Lmain'); const header = document.querySelector('header'); if (mainNav) { window.addEventListener('scroll', function() { const scrollPosition = window.scrollY; if (scrollPosition > 84) { mainNav.classList.add('fixed'); } else { mainNav.classList.remove('fixed'); } }); } }); </script> </body> </html>