• <th id="wwic8"><s id="wwic8"></s></th><strike id="wwic8"></strike>
  • <ul id="wwic8"></ul>
    <th id="wwic8"></th><tr id="wwic8"></tr>\n

    查看新聞<\/h1>\n\n\n \n
    id<\/td>\n title<\/td>\n author<\/td>\n source<\/td>\n content<\/td>\n date<\/td>\n update<\/td>\n delete<\/td>\n<\/tr>\n<?php\n$db=new MySQLi(\"localhost\",\"root\",\"\",\"mydb\");\n!mysqli_connect_error() or die(\"連接失??!\");\n$sql=\"select * from news\";\n$result=$db->query($sql);\n$arr=$result->fetch_all();\nforeach ($arr as $v)\n{\n echo \"
    {$v[0]}<\/td>\n {$v[1]}<\/td>\n {$v[2]}<\/td>\n {$v[3]}<\/td>\n {$v[4]}<\/td>\n {$v[5]}<\/td>\n update<\/a><\/td>\n delete<\/a><\/td>\n \n <\/tr>\";\n }\n \n?>\n<\/table>\n
    \n
    \n
    發(fā)布新聞<\/a><\/div>\n \n<\/body>\n<\/html>\n<\/pre>\n\n

     \"\"<\/p>\n

    2. Publish news page-----Add content <\/strong><\/p>\n\n

    \n\n\n\n發(fā)布新聞<\/title>\n<style>\n.xw\n{\n   \n  margin-top:10px;\n  margin-left:400px;\n  border:thick; \n  }\n.a\n{\n  float:left;\n   \n  }\n \n<\/style>\n \n<\/head>\n \n<body>
    <h1><a href="http://www.miracleart.cn/">国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂</a></h1>\n<h1><center>發(fā)布新聞<\/center><\/h1>\n \n<form action=\"AddChu.php\" method=\"post\">\n<div   id="377j5v51b"   class=\"xw\">標(biāo)題:<input type=\"text\" name=\"title\" style=\"width:400px\"><\/div>\n<div   id="377j5v51b"   class=\"xw\">作者:<input type=\"text\" name=\"author\"><\/div>\n<div   id="377j5v51b"   class=\"xw\">來源:<input type=\"text\" name=\"source\"><\/div>\n<div   id="377j5v51b"   class=\"xw\">內(nèi)容:\n<textarea rows=\"10\" cols=\"80\" name=\"content\"><\/textarea><\/div>\n \n<div   id="377j5v51b"   class=\"a\"><input type=\"submit\" value=\"提交\" style=\"margin-left:600px;\"><\/div>\n<div   id="377j5v51b"   class=\"a\"><a href=\"ChaKan.php\"><input type=\"button\" value=\"查看\" style=\"margin-left:6px;\"><\/a><\/div>\n \n<\/form>\n \n \n<\/body>\n<\/html>\n<\/pre>\n\n<p style=\"text-align: center\"> <img alt=\"\" src=\"http:\/\/www.bkjia.com\/uploads\/allimg\/160513\/01110WS8-4.png\" \/><\/p>\n<p>Processing after submitting content: <\/p>\n\n<pre class='brush:php;toolbar:false;'>\n<?php\n$newsid=$_POST[\"newsid\"];\n$title=$_POST[\"title\"];\n$author=$_POST[\"author\"];\n$source=$_POST[\"source\"];\n$content=$_POST[\"content\"];\n$time=date(\"Y-m-d\",time());\n \n$db=new MySQLi(\"localhost\",\"root\",\"\",\"mydb\");\n!mysqli_connect_error() or die(\"聯(lián)系失敗!\");\n$sql=\"insert into news values('{$newsid}','{$title}','{$author}','{$source}','{$content}','{$time}')\";\n$result=$db->query($sql);\nif($result)\n{\n  header (\"location:xinwen.php\");\n  }\nelse\n{\n  echo \"添加新聞失敗!\";\n  }\n<\/pre>\n\n<p><strong>3. Deletion of content <\/strong><\/p>\n\n<pre class='brush:php;toolbar:false;'>\n<?php\n$newsid=$_GET[\"newsid\"];\n$db=new MySQLi(\"localhost\",\"root\",\"\",\"mydb\");\n!mysqli_connect_error() or die(\"連接失敗!\");\n$sql=\"delete from news where newsid='{$newsid}'\";\n$result=$db->query($sql);\nif($result)\n{\n  header (\"location:ChaKan.php\");\n  }\nelse\n{\n  echo \"刪除數(shù)據(jù)失敗\";\n  }\n?>\n<\/pre>\n?\n<p><strong>4. Modify the news page----modify the news content and submit it for viewing<br \/>\n<\/strong><\/p>\n\n<pre class='brush:php;toolbar:false;'>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/>\n<title>修改新聞<\/title>\n<style>\n.xw\n{\n   \n  margin-top:10px;\n  margin-left:400px;\n  border:thick; \n  }\n   \n.a\n{\n  float:left;\n   \n  }\n \n<\/style>\n<\/head>\n \n<body>\n<h1><center>修改新聞<\/center><\/h1>\n<?php\n$newsid = $_GET[\"newsid\"];\n$db = new MySQLi(\"localhost\",\"root\",\"\",\"mydb\");\n$sinfo = \"select * from news where newsid='{$newsid}'\";\n$r = $db->query($sinfo);\n$arr = $r->fetch_row(); \/\/這個人的所有信息\n?>\n \n<form action=\"UpdateChu.php\" method=\"post\">\n<div   id="377j5v51b"   class=\"xw\"><input type=\"hidden\" name=\"newsid\" value=\"<?php echo $arr[0] ?>\"><\/div>\n<div   id="377j5v51b"   class=\"xw\">標(biāo)題:<input type=\"text\" name=\"title\" style=\"width:400px\" value=\"<?php echo $arr[1] ?>\"><\/div>\n<div   id="377j5v51b"   class=\"xw\">作者:<input type=\"text\" name=\"author\" value=\"<?php echo $arr[2] ?>\"><\/div>\n<div   id="377j5v51b"   class=\"xw\">來源:<input type=\"text\" name=\"source\" value=\"<?php echo $arr[3] ?>\"><\/div>\n<div   id="377j5v51b"   class=\"xw\">內(nèi)容:\n<textarea rows=\"10\" cols=\"80\" name=\"content\"><?php echo $arr[4] ?><\/textarea><\/div>\n \n<div   id="377j5v51b"   class=\"a\"><input type=\"submit\" value=\"修改\" style=\"margin-left:600px;\"><\/div>\n<div   id="377j5v51b"   class=\"a\"><a href=\"ChaKan.php\"><input type=\"button\" value=\"查看\" style=\"margin-left:6px;\"><\/a><\/div>\n \n<\/form>\n \n<\/body>\n<\/html>  \n<\/pre>\n\n<p style=\"text-align: center\"> <img alt=\"\" src=\"http:\/\/www.bkjia.com\/uploads\/allimg\/160513\/01110Q304-5.png\" \/><\/p>\n<p>Submit the modified content for processing: <br \/>\n<\/p>\n\n<pre class='brush:php;toolbar:false;'>\n<?php\n$newsid=$_POST[\"newsid\"];\n$title=$_POST[\"title\"];\n$author=$_POST[\"author\"];\n$source=$_POST[\"source\"];\n$content=$_POST[\"content\"];\n$time=date(\"Y-m-d\",time());\n\n$db=new MySQLi(\"localhost\",\"root\",\"\",\"mydb\");\n!mysqli_connect_error() or die(\"聯(lián)系失敗!\");\n$sql=\"update news set title='{$title}',author='{$author}',source='{$source}',content='{$content}',time='{$time}' where newsid='{$newsid}'\";\n$result=$db->query($sql);\nif($result)\n{\n  header (\"location:Update.php\");\n  }\nelse\n{\n  echo \"修改數(shù)據(jù)失敗!\";\n  }\n<\/pre>\n\n<p>The above is the entire content of this article. I hope it will be helpful to everyone in learning PHP programming. <\/p>\n<p align=\"left\"><\/p>\n<div style=\"display:none;\">\n<span id=\"url\" itemprop=\"url\">http:\/\/www.bkjia.com\/PHPjc\/1125897.html<\/span><span id=\"indexUrl\" itemprop=\"indexUrl\">www.bkjia.com<\/span><span id=\"isOriginal\" itemprop=\"isOriginal\">true<\/span><span id=\"isBasedOnUrl\" itemprop=\"isBasedOnUrl\">http: \/\/www.bkjia.com\/PHPjc\/1125897.html<\/span><span id=\"genre\" itemprop=\"genre\">TechArticle<\/span><span id=\"description\" itemprop=\"description\">php data access add, delete, modify and check operations, php data access add, delete, delete, modify and check operations small exercises, let’s practice it 1. View the news page-----main page htmlheadmeta http-equiv=\"Conten...<\/span>\n<\/div>\n<div   id="377j5v51b"   class=\"art_confoot\"><\/div>"}	</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="377j5v51b"   class="head">
            <div   id="377j5v51b"   class="haed_left">
                <div   id="377j5v51b"   class="haed_logo">
                    <a href="http://www.miracleart.cn/" title="" class="haed_logo_a">
                        <img src="/static/imghw/logo.png" alt="" class="haed_logoimg">
                    </a>
                </div>
                <div   id="377j5v51b"   class="head_nav">
                    <div   id="377j5v51b"   class="head_navs">
                        <a href="javascript:;" title="Community" class="head_nava head_nava-template1">Community</a>
                        <div   class="377j5v51b"   id="dropdown-template1" style="display: none;">
                            <div   id="377j5v51b"   class="languagechoose">
                                <a href="http://www.miracleart.cn/article.html" title="Articles" class="languagechoosea on">Articles</a>
                                <a href="http://www.miracleart.cn/faq/zt" title="Topics" class="languagechoosea">Topics</a>
                                <a href="http://www.miracleart.cn/wenda.html" title="Q&A" class="languagechoosea">Q&A</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="377j5v51b"   class="head_navs">
                        <a href="javascript:;" title="Learn" class="head_nava head_nava-template1_1">Learn</a>
                        <div   class="377j5v51b"   id="dropdown-template1_1" style="display: none;">
                            <div   id="377j5v51b"   class="languagechoose">
                                <a href="http://www.miracleart.cn/course.html" title="Course" class="languagechoosea on">Course</a>
                                <a href="http://www.miracleart.cn/dic/" title="Programming Dictionary" class="languagechoosea">Programming Dictionary</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="377j5v51b"   class="head_navs">
                        <a href="javascript:;" title="Tools Library" class="head_nava head_nava-template1_2">Tools Library</a>
                        <div   class="377j5v51b"   id="dropdown-template1_2" style="display: none;">
                            <div   id="377j5v51b"   class="languagechoose">
                                <a href="http://www.miracleart.cn/toolset/development-tools" title="Development tools" class="languagechoosea on">Development tools</a>
                                <a href="http://www.miracleart.cn/toolset/website-source-code" title="Website Source Code" class="languagechoosea">Website Source Code</a>
                                <a href="http://www.miracleart.cn/toolset/php-libraries" title="PHP Libraries" class="languagechoosea">PHP Libraries</a>
                                <a href="http://www.miracleart.cn/toolset/js-special-effects" title="JS special effects" class="languagechoosea on">JS special effects</a>
                                <a href="http://www.miracleart.cn/toolset/website-materials" title="Website Materials" class="languagechoosea on">Website Materials</a>
                                <a href="http://www.miracleart.cn/toolset/extension-plug-ins" title="Extension plug-ins" class="languagechoosea on">Extension plug-ins</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="377j5v51b"   class="head_navs">
                        <a href="http://www.miracleart.cn/ai" title="AI Tools" class="head_nava head_nava-template1_3">AI Tools</a>
                    </div>
    
                    <div   id="377j5v51b"   class="head_navs">
                        <a href="javascript:;" title="Leisure" class="head_nava head_nava-template1_3">Leisure</a>
                        <div   class="377j5v51b"   id="dropdown-template1_3" style="display: none;">
                            <div   id="377j5v51b"   class="languagechoose">
                                <a href="http://www.miracleart.cn/game" title="Game Download" class="languagechoosea on">Game Download</a>
                                <a href="http://www.miracleart.cn/mobile-game-tutorial/" title="Game Tutorials" class="languagechoosea">Game Tutorials</a>
    
                            </div>
                        </div>
                    </div>
                </div>
            </div>
                        <div   id="377j5v51b"   class="head_search">
                    <input id="key_words"  onkeydown="if (event.keyCode == 13) searchs('en')" class="search-input" type="text" autocomplete="off" name="keywords" required="required" placeholder="Block,address,transaction,news" value="">
                    <a href="javascript:;" title="search"  onclick="searchs('en')"><img src="/static/imghw/find.png" alt="search"></a>
                </div>
                    <div   id="377j5v51b"   class="head_right">
                <div   id="377j5v51b"   class="haed_language">
                    <a href="javascript:;" class="layui-btn haed_language_btn">English<i class="layui-icon layui-icon-triangle-d"></i></a>
                    <div   class="377j5v51b"   id="dropdown-template" style="display: none;">
                        <div   id="377j5v51b"   class="languagechoose">
                                                    <a href="javascript:setlang('zh-cn');" title="簡體中文" class="languagechoosea">簡體中文</a>
                                                    <a href="javascript:;" title="English" class="languagechoosea">English</a>
                                                    <a href="javascript:setlang('zh-tw');" 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="377j5v51b"    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="377j5v51b"   class="Article_Details_main">
    			<div   id="377j5v51b"   class="Article_Details_main1">
    							<div   id="377j5v51b"   class="Article_Details_main1L">
    					<div   id="377j5v51b"   class="Article_Details_main1Lmain" id="Article_Details_main1Lmain">
    						<div   id="377j5v51b"   class="Article_Details_main1L1">Table of Contents</div>
    						<div   id="377j5v51b"   class="Article_Details_main1L2" id="Article_Details_main1L2">
    							<!-- 左側(cè)懸浮,文章定位標(biāo)題1 id="Article_Details_main1L2s_1"-->
    															<div   id="377j5v51b"   class="Article_Details_main1L2s ">
    									<a href="#Add-delete-modify-and-check-operations-of-php-data-access-add-and-delete-php-data-access" title="Add, delete, modify and check operations of php data access, add and delete php data access" >Add, delete, modify and check operations of php data access, add and delete php data access</a>
    								</div>
    														</div>
    					</div>
    				</div>
    							<div   id="377j5v51b"   class="Article_Details_main1M">
    					<div   id="377j5v51b"   class="phpgenera_Details_mainL1">
    						<a href="http://www.miracleart.cn/" title="Home"
    							class="phpgenera_Details_mainL1a">Home</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    												<a href="http://www.miracleart.cn/be/"
    							class="phpgenera_Details_mainL1a">Backend Development</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    												<a href="http://www.miracleart.cn/php-weizijiaocheng.html"
    							class="phpgenera_Details_mainL1a">PHP Tutorial</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    						<span>PHP data access add, delete, modify and check operations, PHP data access add and delete_PHP tutorial</span>
    					</div>
    					
    					<div   id="377j5v51b"   class="Articlelist_txts">
    						<div   id="377j5v51b"   class="Articlelist_txts_info">
    							<h1 class="Articlelist_txts_title">PHP data access add, delete, modify and check operations, PHP data access add and delete_PHP tutorial</h1>
    							<div   id="377j5v51b"   class="Articlelist_txts_info_head">
    								<div   id="377j5v51b"   class="author_info">
    									<a href="http://www.miracleart.cn/member/887227.html"  class="author_avatar">
    									<img class="lazy"  data-src="https://img.php.cn/upload/avatar/000/887/227/63bb7851c9547215.jpg" src="/static/imghw/default1.png" alt="WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB">
    									</a>
    									<div   id="377j5v51b"   class="author_detail">
    																			<a href="http://www.miracleart.cn/member/887227.html" class="author_name">WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB</a>
                                    										</div>
    								</div>
                    			</div>
    							<span id="377j5v51b"    class="Articlelist_txts_time">Jul 12, 2016 am	 08:52 AM</span>
    															<div   id="377j5v51b"   class="Articlelist_txts_infos">
    																			<span id="377j5v51b"    class="Articlelist_txts_infoss on">php</span>
    																			<span id="377j5v51b"    class="Articlelist_txts_infoss ">Add, delete, modify and check</span>
    																			<span id="377j5v51b"    class="Articlelist_txts_infoss ">data access</span>
    																	</div>
    														
    						</div>
    					</div>
    					<hr />
    					<div   id="377j5v51b"   class="article_main php-article">
    						<div   id="377j5v51b"   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></p>
    <h2 id="Add-delete-modify-and-check-operations-of-php-data-access-add-and-delete-php-data-access">Add, delete, modify and check operations of php data access, add and delete php data access</h2>
    <p>Small practice on add, delete, modify and check operations, let’s practice it</p>
    <p style="text-align: center"><img src="/static/imghw/default1.png" data-src="http://www.bkjia.com/uploads/allimg/160513/01110UG6-0.png" class="lazy" alt=""></p>
    <p style="text-align: center"><img src="/static/imghw/default1.png" data-src="http://www.bkjia.com/uploads/allimg/160513/01110QM2-1.png" class="lazy" alt=""></p>
    <p style="text-align: center"><img src="/static/imghw/default1.png" data-src="http://www.bkjia.com/uploads/allimg/160513/01110V954-2.png" class="lazy" alt=""></p>
    <p><strong>1. View the news page-----main page </strong></p>
    
    <pre class='brush:php;toolbar:false;'>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>查看新聞</title>
    </head>
     
    <body>
    <h1>查看新聞</h1>
    <table width="100%" border="1" cellpadding="0" cellspacing="0">
    <tr>
      <td>id</td>
      <td>title</td>
      <td>author</td>
      <td>source</td>
       <td>content</td>
      <td>date</td>
      <td>update</td>
      <td>delete</td>
    </tr>
    <&#63;php
    $db=new MySQLi("localhost","root","","mydb");
    !mysqli_connect_error() or die("連接失敗!");
    $sql="select * from news";
    $result=$db->query($sql);
    $arr=$result->fetch_all();
    foreach ($arr as $v)
    {
      echo "<tr>
      <td>{$v[0]}</td>
      <td>{$v[1]}</td>
      <td>{$v[2]}</td>
      <td>{$v[3]}</td>
      <td>{$v[4]}</td>
      <td>{$v[5]}</td>
      <td><a href='Update.php&#63;newsid={$v[0]}'>update</a></td>
      <td><a href='Delete.php&#63;newsid={$v[0]}'>delete</a></td>
       
      </tr>";
      }
     
    &#63;>
    </table>
    <br>
    <br />
    <div class="xw"><a href="xinwen.php">發(fā)布新聞</a></div>
     
    </body>
    </html>
    </pre>
    
    <p style="text-align: center"> <img src="/static/imghw/default1.png"  data-src="http://www.bkjia.com/uploads/allimg/160513/01110UV1-3.png"  class="lazy"  alt="" /></p>
    <p><strong>2. Publish news page-----Add content </strong></p>
    
    <pre class='brush:php;toolbar:false;'>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>發(fā)布新聞</title>
    <style>
    .xw
    {
       
      margin-top:10px;
      margin-left:400px;
      border:thick; 
      }
    .a
    {
      float:left;
       
      }
     
    </style>
     
    </head>
     
    <body>
    <h1><center>發(fā)布新聞</center></h1>
     
    <form action="AddChu.php" method="post">
    <div class="xw">標(biāo)題:<input type="text" name="title" style="width:400px"></div>
    <div class="xw">作者:<input type="text" name="author"></div>
    <div class="xw">來源:<input type="text" name="source"></div>
    <div class="xw">內(nèi)容:
    <textarea rows="10" cols="80" name="content"></textarea></div>
     
    <div class="a"><input type="submit" value="提交" style="margin-left:600px;"></div>
    <div class="a"><a href="ChaKan.php"><input type="button" value="查看" style="margin-left:6px;"></a></div>
     
    </form>
     
     
    </body>
    </html>
    </pre>
    
    <p style="text-align: center"> <img src="/static/imghw/default1.png"  data-src="http://www.bkjia.com/uploads/allimg/160513/01110WS8-4.png"  class="lazy"  alt="" /></p>
    <p>Processing after submitting content: </p>
    
    <pre class='brush:php;toolbar:false;'>
    <&#63;php
    $newsid=$_POST["newsid"];
    $title=$_POST["title"];
    $author=$_POST["author"];
    $source=$_POST["source"];
    $content=$_POST["content"];
    $time=date("Y-m-d",time());
     
    $db=new MySQLi("localhost","root","","mydb");
    !mysqli_connect_error() or die("聯(lián)系失敗!");
    $sql="insert into news values('{$newsid}','{$title}','{$author}','{$source}','{$content}','{$time}')";
    $result=$db->query($sql);
    if($result)
    {
      header ("location:xinwen.php");
      }
    else
    {
      echo "添加新聞失??!";
      }
    </pre>
    
    <p><strong>3. Deletion of content </strong></p>
    
    <pre class='brush:php;toolbar:false;'>
    <&#63;php
    $newsid=$_GET["newsid"];
    $db=new MySQLi("localhost","root","","mydb");
    !mysqli_connect_error() or die("連接失敗!");
    $sql="delete from news where newsid='{$newsid}'";
    $result=$db->query($sql);
    if($result)
    {
      header ("location:ChaKan.php");
      }
    else
    {
      echo "刪除數(shù)據(jù)失敗";
      }
    &#63;>
    </pre>
    ?
    <p><strong>4. Modify the news page----modify the news content and submit it for viewing<br />
    </strong></p>
    
    <pre class='brush:php;toolbar:false;'>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>修改新聞</title>
    <style>
    .xw
    {
       
      margin-top:10px;
      margin-left:400px;
      border:thick; 
      }
       
    .a
    {
      float:left;
       
      }
     
    </style>
    </head>
     
    <body>
    <h1><center>修改新聞</center></h1>
    <&#63;php
    $newsid = $_GET["newsid"];
    $db = new MySQLi("localhost","root","","mydb");
    $sinfo = "select * from news where newsid='{$newsid}'";
    $r = $db->query($sinfo);
    $arr = $r->fetch_row(); //這個人的所有信息
    &#63;>
     
    <form action="UpdateChu.php" method="post">
    <div class="xw"><input type="hidden" name="newsid" value="<&#63;php echo $arr[0] &#63;>"></div>
    <div class="xw">標(biāo)題:<input type="text" name="title" style="width:400px" value="<&#63;php echo $arr[1] &#63;>"></div>
    <div class="xw">作者:<input type="text" name="author" value="<&#63;php echo $arr[2] &#63;>"></div>
    <div class="xw">來源:<input type="text" name="source" value="<&#63;php echo $arr[3] &#63;>"></div>
    <div class="xw">內(nèi)容:
    <textarea rows="10" cols="80" name="content"><&#63;php echo $arr[4] &#63;></textarea></div>
     
    <div class="a"><input type="submit" value="修改" style="margin-left:600px;"></div>
    <div class="a"><a href="ChaKan.php"><input type="button" value="查看" style="margin-left:6px;"></a></div>
     
    </form>
     
    </body>
    </html>  
    </pre>
    
    <p style="text-align: center"> <img src="/static/imghw/default1.png"  data-src="http://www.bkjia.com/uploads/allimg/160513/01110Q304-5.png"  class="lazy"  alt="" /></p>
    <p>Submit the modified content for processing: <br />
    </p>
    
    <pre class='brush:php;toolbar:false;'>
    <&#63;php
    $newsid=$_POST["newsid"];
    $title=$_POST["title"];
    $author=$_POST["author"];
    $source=$_POST["source"];
    $content=$_POST["content"];
    $time=date("Y-m-d",time());
    
    $db=new MySQLi("localhost","root","","mydb");
    !mysqli_connect_error() or die("聯(lián)系失敗!");
    $sql="update news set title='{$title}',author='{$author}',source='{$source}',content='{$content}',time='{$time}' where newsid='{$newsid}'";
    $result=$db->query($sql);
    if($result)
    {
      header ("location:Update.php");
      }
    else
    {
      echo "修改數(shù)據(jù)失敗!";
      }
    </pre>
    
    <p>The above is the entire content of this article. I hope it will be helpful to everyone in learning PHP programming. </p>
    <p align="left"></p>
    <div style="display:none;">
    <span id="url" itemprop="url">http://www.bkjia.com/PHPjc/1125897.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http: //www.bkjia.com/PHPjc/1125897.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">php data access add, delete, modify and check operations, php data access add, delete, delete, modify and check operations small exercises, let’s practice it 1. View the news page-----main page htmlheadmeta http-equiv="Conten...</span>
    </div>
    <div   id="377j5v51b"   class="art_confoot"></div>
    
    
    						</div>
    					</div>
    					<div   id="377j5v51b"   class="wzconShengming_sp">
    						<div   id="377j5v51b"   class="bzsmdiv_sp">Statement of this Website</div>
    						<div>The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact 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="377j5v51b"   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="377j5v51b"   class="phpgenera_Details_mainR4">
    						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
    							<div   id="377j5v51b"   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>Hot Article</h2>
    							</div>
    							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796821119.html" title="Guide: Stellar Blade Save File Location/Save File Lost/Not Saving" class="phpgenera_Details_mainR4_bottom_title">Guide: Stellar Blade Save File Location/Save File Lost/Not Saving</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By DDD</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796827210.html" title="Oguri Cap Build Guide | A Pretty Derby Musume" class="phpgenera_Details_mainR4_bottom_title">Oguri Cap Build Guide | A Pretty Derby Musume</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>2 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796828723.html" title="Agnes Tachyon Build Guide | A Pretty Derby Musume" class="phpgenera_Details_mainR4_bottom_title">Agnes Tachyon Build Guide | A Pretty Derby Musume</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>1 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796821436.html" title="Dune: Awakening - Advanced Planetologist Quest Walkthrough" class="phpgenera_Details_mainR4_bottom_title">Dune: Awakening - Advanced Planetologist Quest Walkthrough</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796821278.html" title="Date Everything: Dirk And Harper Relationship Guide" class="phpgenera_Details_mainR4_bottom_title">Date Everything: Dirk And Harper Relationship Guide</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    														</div>
    							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
    								<a href="http://www.miracleart.cn/article.html">Show More</a>
    							</div>
    						</div>
    					</div> -->
    
    
    											<div   id="377j5v51b"   class="phpgenera_Details_mainR3">
    							<div   id="377j5v51b"   class="phpmain1_4R_readrank">
    								<div   id="377j5v51b"   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>Hot AI Tools</h2>
    								</div>
    								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_bottom">
    																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/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="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title">
    													<h3>Undress AI Tool</h3>
    												</a>
    												<p>Undress images for free</p>
    											</div>
    										</div>
    																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/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="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title">
    													<h3>Undresser.AI Undress</h3>
    												</a>
    												<p>AI-powered app for creating realistic nude photos</p>
    											</div>
    										</div>
    																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/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="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title">
    													<h3>AI Clothes Remover</h3>
    												</a>
    												<p>Online AI tool for removing clothes from photos.</p>
    											</div>
    										</div>
    																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/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="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title">
    													<h3>Clothoff.io</h3>
    												</a>
    												<p>AI clothes remover</p>
    											</div>
    										</div>
    																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/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="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title">
    													<h3>Video Face Swap</h3>
    												</a>
    												<p>Swap faces in any video effortlessly with our completely free AI face swap tool!</p>
    											</div>
    										</div>
    																</div>
    								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
    									<a href="http://www.miracleart.cn/ai">Show More</a>
    								</div>
    							</div>
    						</div>
    					
    
    
    					<div   id="377j5v51b"   class="phpgenera_Details_mainR4">
    						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
    							<div   id="377j5v51b"   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>Hot Article</h2>
    							</div>
    							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796821119.html" title="Guide: Stellar Blade Save File Location/Save File Lost/Not Saving" class="phpgenera_Details_mainR4_bottom_title">Guide: Stellar Blade Save File Location/Save File Lost/Not Saving</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By DDD</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796827210.html" title="Oguri Cap Build Guide | A Pretty Derby Musume" class="phpgenera_Details_mainR4_bottom_title">Oguri Cap Build Guide | A Pretty Derby Musume</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>2 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796828723.html" title="Agnes Tachyon Build Guide | A Pretty Derby Musume" class="phpgenera_Details_mainR4_bottom_title">Agnes Tachyon Build Guide | A Pretty Derby Musume</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>1 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796821436.html" title="Dune: Awakening - Advanced Planetologist Quest Walkthrough" class="phpgenera_Details_mainR4_bottom_title">Dune: Awakening - Advanced Planetologist Quest Walkthrough</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/1796821278.html" title="Date Everything: Dirk And Harper Relationship Guide" class="phpgenera_Details_mainR4_bottom_title">Date Everything: Dirk And Harper Relationship Guide</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    														</div>
    							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
    								<a href="http://www.miracleart.cn/article.html">Show More</a>
    							</div>
    						</div>
    					</div>
    
    
    											<div   id="377j5v51b"   class="phpgenera_Details_mainR3">
    							<div   id="377j5v51b"   class="phpmain1_4R_readrank">
    								<div   id="377j5v51b"   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>Hot Tools</h2>
    								</div>
    								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_bottom">
    																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/toolset/development-tools/92" title="Notepad++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="Notepad++7.3.1" />
    											</a>
    											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_title">
    													<h3>Notepad++7.3.1</h3>
    												</a>
    												<p>Easy-to-use and free code editor</p>
    											</div>
    										</div>
    																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/toolset/development-tools/93" title="SublimeText3 Chinese version" 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 Chinese version" />
    											</a>
    											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/toolset/development-tools/93" title="SublimeText3 Chinese version" class="phpmain_tab2_mids_title">
    													<h3>SublimeText3 Chinese version</h3>
    												</a>
    												<p>Chinese version, very easy to use</p>
    											</div>
    										</div>
    																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/toolset/development-tools/121" title="Zend Studio 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="Zend Studio 13.0.1" />
    											</a>
    											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/toolset/development-tools/121" title="Zend Studio 13.0.1" class="phpmain_tab2_mids_title">
    													<h3>Zend Studio 13.0.1</h3>
    												</a>
    												<p>Powerful PHP integrated development environment</p>
    											</div>
    										</div>
    																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/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="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title">
    													<h3>Dreamweaver CS6</h3>
    												</a>
    												<p>Visual web development tools</p>
    											</div>
    										</div>
    																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
    											<a href="http://www.miracleart.cn/toolset/development-tools/500" title="SublimeText3 Mac version" 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 version" />
    											</a>
    											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
    												<a href="http://www.miracleart.cn/toolset/development-tools/500" title="SublimeText3 Mac version" class="phpmain_tab2_mids_title">
    													<h3>SublimeText3 Mac version</h3>
    												</a>
    												<p>God-level code editing software (SublimeText3)</p>
    											</div>
    										</div>
    																	</div>
    								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
    									<a href="http://www.miracleart.cn/ai">Show More</a>
    								</div>
    							</div>
    						</div>
    										
    
    					
    					<div   id="377j5v51b"   class="phpgenera_Details_mainR4">
    						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
    							<div   id="377j5v51b"   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>Hot Topics</h2>
    							</div>
    							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/gmailyxdlrkzn" title="Where is the login entrance for gmail email?" class="phpgenera_Details_mainR4_bottom_title">Where is the login entrance for gmail email?</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>8637</span>
    										</div>
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>17</span>
    										</div>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/java-tutorial" title="Java Tutorial" class="phpgenera_Details_mainR4_bottom_title">Java Tutorial</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1783</span>
    										</div>
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>16</span>
    										</div>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/cakephp-tutor" title="CakePHP Tutorial" class="phpgenera_Details_mainR4_bottom_title">CakePHP Tutorial</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1728</span>
    										</div>
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>56</span>
    										</div>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/laravel-tutori" title="Laravel Tutorial" class="phpgenera_Details_mainR4_bottom_title">Laravel Tutorial</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1577</span>
    										</div>
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>28</span>
    										</div>
    									</div>
    								</div>
    															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://www.miracleart.cn/faq/php-tutorial" title="PHP Tutorial" class="phpgenera_Details_mainR4_bottom_title">PHP Tutorial</a>
    									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1442</span>
    										</div>
    										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>31</span>
    										</div>
    									</div>
    								</div>
    														</div>
    							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
    								<a href="http://www.miracleart.cn/faq/zt">Show More</a>
    							</div>
    						</div>
    					</div>
    				</div>
    			</div>
    							<div   id="377j5v51b"   class="Article_Details_main2">
    					<div   id="377j5v51b"   class="phpgenera_Details_mainL4">
    						<div   id="377j5v51b"   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="377j5v51b"   class="phpgenera_Details_mainL4_info">
    
    													<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796836348.html" title="How to get the current session ID in PHP?" 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/175234695153283.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="How to get the current session ID in PHP?" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796836348.html" title="How to get the current session ID in PHP?" class="phphistorical_Version2_mids_title">How to get the current session ID in PHP?</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 13, 2025 am	 03:02 AM</span>
    								<p class="Articlelist_txts_p">The method to get the current session ID in PHP is to use the session_id() function, but you must call session_start() to successfully obtain it. 1. Call session_start() to start the session; 2. Use session_id() to read the session ID and output a string similar to abc123def456ghi789; 3. If the return is empty, check whether session_start() is missing, whether the user accesses for the first time, or whether the session is destroyed; 4. The session ID can be used for logging, security verification and cross-request communication, but security needs to be paid attention to. Make sure that the session is correctly enabled and the ID can be obtained successfully.</p>
    							</div>
    														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796836340.html" title="PHP get substring from a string" 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/175234679154731.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="PHP get substring from a string" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796836340.html" title="PHP get substring from a string" class="phphistorical_Version2_mids_title">PHP get substring from a string</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 13, 2025 am	 02:59 AM</span>
    								<p class="Articlelist_txts_p">To extract substrings from PHP strings, you can use the substr() function, which is syntax substr(string$string,int$start,?int$length=null), and if the length is not specified, it will be intercepted to the end; when processing multi-byte characters such as Chinese, you should use the mb_substr() function to avoid garbled code; if you need to intercept the string according to a specific separator, you can use exploit() or combine strpos() and substr() to implement it, such as extracting file name extensions or domain names.</p>
    							</div>
    														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796836325.html" title="How do you perform unit testing for php code?" 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/175234647176044.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="How do you perform unit testing for php code?" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796836325.html" title="How do you perform unit testing for php code?" class="phphistorical_Version2_mids_title">How do you perform unit testing for php code?</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 13, 2025 am	 02:54 AM</span>
    								<p class="Articlelist_txts_p">UnittestinginPHPinvolvesverifyingindividualcodeunitslikefunctionsormethodstocatchbugsearlyandensurereliablerefactoring.1)SetupPHPUnitviaComposer,createatestdirectory,andconfigureautoloadandphpunit.xml.2)Writetestcasesfollowingthearrange-act-assertpat</p>
    							</div>
    														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796836338.html" title="How to split a string into an array in PHP" 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/175234675030817.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="How to split a string into an array in PHP" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796836338.html" title="How to split a string into an array in PHP" class="phphistorical_Version2_mids_title">How to split a string into an array in PHP</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 13, 2025 am	 02:59 AM</span>
    								<p class="Articlelist_txts_p">In PHP, the most common method is to split the string into an array using the exploit() function. This function divides the string into multiple parts through the specified delimiter and returns an array. The syntax is exploit(separator, string, limit), where separator is the separator, string is the original string, and limit is an optional parameter to control the maximum number of segments. For example $str="apple,banana,orange";$arr=explode(",",$str); The result is ["apple","bana</p>
    							</div>
    														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796836292.html" title="JavaScript Data Types: Primitive vs Reference" 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/175234579081669.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="JavaScript Data Types: Primitive vs Reference" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796836292.html" title="JavaScript Data Types: Primitive vs Reference" class="phphistorical_Version2_mids_title">JavaScript Data Types: Primitive vs Reference</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 13, 2025 am	 02:43 AM</span>
    								<p class="Articlelist_txts_p">JavaScript data types are divided into primitive types and reference types. Primitive types include string, number, boolean, null, undefined, and symbol. The values are immutable and copies are copied when assigning values, so they do not affect each other; reference types such as objects, arrays and functions store memory addresses, and variables pointing to the same object will affect each other. Typeof and instanceof can be used to determine types, but pay attention to the historical issues of typeofnull. Understanding these two types of differences can help write more stable and reliable code.</p>
    							</div>
    														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796837310.html" title="Using std::chrono in C" 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/175251423054720.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Using std::chrono in C" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796837310.html" title="Using std::chrono in C" class="phphistorical_Version2_mids_title">Using std::chrono in C</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 15, 2025 am	 01:30 AM</span>
    								<p class="Articlelist_txts_p">std::chrono is used in C to process time, including obtaining the current time, measuring execution time, operation time point and duration, and formatting analysis time. 1. Use std::chrono::system_clock::now() to obtain the current time, which can be converted into a readable string, but the system clock may not be monotonous; 2. Use std::chrono::steady_clock to measure the execution time to ensure monotony, and convert it into milliseconds, seconds and other units through duration_cast; 3. Time point (time_point) and duration (duration) can be interoperable, but attention should be paid to unit compatibility and clock epoch (epoch)</p>
    							</div>
    														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796836281.html" title="How to pass a session variable to another page in PHP?" 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/175234556015595.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="How to pass a session variable to another page in PHP?" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796836281.html" title="How to pass a session variable to another page in PHP?" class="phphistorical_Version2_mids_title">How to pass a session variable to another page in PHP?</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 13, 2025 am	 02:39 AM</span>
    								<p class="Articlelist_txts_p">In PHP, to pass a session variable to another page, the key is to start the session correctly and use the same $_SESSION key name. 1. Before using session variables for each page, it must be called session_start() and placed in the front of the script; 2. Set session variables such as $_SESSION['username']='JohnDoe' on the first page; 3. After calling session_start() on another page, access the variables through the same key name; 4. Make sure that session_start() is called on each page, avoid outputting content in advance, and check that the session storage path on the server is writable; 5. Use ses</p>
    							</div>
    														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
    								<a href="http://www.miracleart.cn/faq/1796836980.html" title="How does PHP handle Environment Variables?" 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/175243330086297.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="How does PHP handle Environment Variables?" />
    								</a>
    								<a href="http://www.miracleart.cn/faq/1796836980.html" title="How does PHP handle Environment Variables?" class="phphistorical_Version2_mids_title">How does PHP handle Environment Variables?</a>
    								<span id="377j5v51b"    class="Articlelist_txts_time">Jul 14, 2025 am	 03:01 AM</span>
    								<p class="Articlelist_txts_p">ToaccessenvironmentvariablesinPHP,usegetenv()orthe$_ENVsuperglobal.1.getenv('VAR_NAME')retrievesaspecificvariable.2.$_ENV['VAR_NAME']accessesvariablesifvariables_orderinphp.iniincludes"E".SetvariablesviaCLIwithVAR=valuephpscript.php,inApach</p>
    							</div>
    													</div>
    
    													<a href="http://www.miracleart.cn/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   id="377j5v51b"   class="footer">
            <div   id="377j5v51b"   class="footertop">
                <img src="/static/imghw/logo.png" alt="">
                <p>Public welfare online PHP training,Help PHP learners grow quickly!</p>
            </div>
            <div   id="377j5v51b"   class="footermid">
                <a href="http://www.miracleart.cn/about/us.html">About us</a>
                <a href="http://www.miracleart.cn/about/disclaimer.html">Disclaimer</a>
                <a href="http://www.miracleart.cn/update/article_0_1.html">Sitemap</a>
            </div>
            <div   id="377j5v51b"   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://www.miracleart.cn/" title="国产av日韩一区二区三区精品">国产av日韩一区二区三区精品</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="yiewe" class="pl_css_ganrao" style="display: none;"><blockquote id="yiewe"></blockquote><tr id="yiewe"></tr><tbody id="yiewe"></tbody><center id="yiewe"></center><center id="yiewe"></center><nav id="yiewe"><kbd id="yiewe"><acronym id="yiewe"></acronym></kbd></nav><object id="yiewe"></object><samp id="yiewe"><tbody id="yiewe"><wbr id="yiewe"></wbr></tbody></samp><tr id="yiewe"></tr><td id="yiewe"></td><tr id="yiewe"><rt id="yiewe"><fieldset id="yiewe"></fieldset></rt></tr><tbody id="yiewe"></tbody><table id="yiewe"><del id="yiewe"><dfn id="yiewe"></dfn></del></table><tr id="yiewe"></tr><button id="yiewe"></button><del id="yiewe"><tr id="yiewe"><td id="yiewe"></td></tr></del><bdo id="yiewe"></bdo><small id="yiewe"></small><pre id="yiewe"></pre><cite id="yiewe"></cite><acronym id="yiewe"><dd id="yiewe"><strike id="yiewe"></strike></dd></acronym><tr id="yiewe"><s id="yiewe"><bdo id="yiewe"></bdo></s></tr><dd id="yiewe"><cite id="yiewe"><nav id="yiewe"></nav></cite></dd><tr id="yiewe"></tr><kbd id="yiewe"></kbd><tbody id="yiewe"><pre id="yiewe"><samp id="yiewe"></samp></pre></tbody><object id="yiewe"><small id="yiewe"><button id="yiewe"></button></small></object><nav id="yiewe"></nav><noframes id="yiewe"><blockquote id="yiewe"><tfoot id="yiewe"></tfoot></blockquote></noframes><blockquote id="yiewe"></blockquote><abbr id="yiewe"></abbr><cite id="yiewe"><abbr id="yiewe"><kbd id="yiewe"></kbd></abbr></cite><center id="yiewe"><dl id="yiewe"><input id="yiewe"></input></dl></center><option id="yiewe"></option><dfn id="yiewe"></dfn><bdo id="yiewe"></bdo><option id="yiewe"></option><code id="yiewe"></code><tfoot id="yiewe"></tfoot><input id="yiewe"><tbody id="yiewe"><button id="yiewe"></button></tbody></input><del id="yiewe"></del><abbr id="yiewe"><kbd id="yiewe"><pre id="yiewe"></pre></kbd></abbr><center id="yiewe"></center><blockquote id="yiewe"></blockquote><ul id="yiewe"></ul><s id="yiewe"></s><small id="yiewe"></small><tfoot id="yiewe"></tfoot></div>
    
    </html>