国产欧美日韩精品久久久,久久综合久久久久http://m.wzjdgyp.com/龍巖小程序開發(fā),龍巖分銷系統子頁面?zhèn)鬟f參數到父頁面http://m.wzjdgyp.com/post/2717.html<p>window.postMessage 是一種跨文檔通信的方法,允許來自一個文檔(例如一個網頁或Iframe)向另一個文檔發(fā)送消息。這在Iframe中使用尤其有用,因為它允許父頁面和Iframe之間的安全通信。實例中在父頁面點擊按鈕彈出子頁面窗口,子頁面窗口關閉后需要傳遞參數到父頁面。<br/></p><p><br/></p><p>父頁面</p><p>window.addEventListener(&#39;message&#39;, function(event) {</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; if (event.data.action === &#39;dataFromChild&#39;) {</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var id =&nbsp; event.data.id;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var sn =&nbsp; event.data.sn;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var name =&nbsp; event.data.name;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var price =&nbsp; event.data.price;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var thumb =&nbsp; event.data.thumb;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; // 處理數據</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; console.log(id);</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; }</p><p>}, false);</p><p><br/></p><p>子頁面</p><p><br/></p><p>$(&quot;.sel&quot;).click(function(){</p><p>&nbsp; &nbsp; &nbsp; var id = $(this).data(&quot;id&quot;);</p><p>&nbsp; &nbsp; &nbsp; var sn = $(this).data(&quot;sn&quot;);</p><p>&nbsp; &nbsp; &nbsp; var name = $(this).data(&quot;name&quot;);</p><p>&nbsp; &nbsp; &nbsp; var price = $(this).data(&quot;price&quot;);</p><p>&nbsp; &nbsp; &nbsp; var thumb = $(this).data(&quot;thumb&quot;);</p><p>&nbsp; &nbsp; &nbsp; window.parent.postMessage({ action: &#39;dataFromChild&#39;, id: id, sn: sn, name: name, price:price, thumb:thumb }, &#39;*&#39;);</p><p>&nbsp; &nbsp; &nbsp; var index = parent.layer.getFrameIndex(window.name); //獲取窗口索引</p><p>&nbsp; &nbsp; &nbsp; parent.layer.close(index);&nbsp; // 關閉layer</p><p>})</p><p><br/></p>Thu, 22 May 2025 16:32:01 +0800php 將 unicode 字符串轉中文的方法http://m.wzjdgyp.com/post/2716.html<p>$txt = &quot;\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5&quot;;</p><p><br/></p><p>function u2c($str)</p><p>{</p><p><span style="white-space-collapse: preserve;"> </span>return preg_replace_callback(</p><p><span style="white-space-collapse: preserve;"> </span>&quot;#\\\u([0-9a-f]{4})#i&quot;,</p><p><span style="white-space-collapse: preserve;"> </span>function ($r) {</p><p><span style="white-space-collapse: preserve;"> </span>return iconv(&#39;UCS-2BE&#39;, &#39;UTF-8&#39;, pack(&#39;H4&#39;, $r[1]));</p><p><span style="white-space-collapse: preserve;"> </span>},</p><p><span style="white-space-collapse: preserve;"> </span>$str</p><p><span style="white-space-collapse: preserve;"> </span>);</p><p>}</p><p><br/></p><p>echo u2c($txt);</p><p>轉后后顯示中文“系統繁忙,請稍后重試”<br/></p><p><br/></p>Sun, 18 May 2025 19:46:20 +0800mysql更新某個字段中要查找的字符替換成新的字符http://m.wzjdgyp.com/post/2715.html<p>UPDATE news SET content = REPLACE(content, &#39;查找的字符&#39;, &#39;替換的字符&#39;) WHERE id&gt;0;</p><p><br/></p><p>content 為要查找的字段</p>Mon, 05 May 2025 23:42:18 +0800如何設置Win10默認輸入法是英語的http://m.wzjdgyp.com/post/2714.html<p>1. 打開電腦之后,在桌面左下角點擊打開“開始”按鈕,打開“設置”選項。</p><p>2. 打開設置選項之后,在Windows設置頁面中點擊打開“時間和語言”選項。</p><p>3. 進入時間和語言設置頁面之后,在“語言”頁面中先點擊“中文”選項,再打開“選項”。</p><p>4. 進入語言選項頁面之后,在鍵盤處點擊一個輸入法,打開該輸入法下的“選項”。</p><p>5. 進入輸入法的設置頁面之后,在該頁面中點擊打開“常規(guī)”選項。</p><p>6. 進入常規(guī)設置頁面之后,打開“選擇輸入法默認模式”選項,在下拉列表中選擇“英語”選項即可。</p>Sat, 26 Apr 2025 18:29:39 +0800mysql 存儲過程 動態(tài)拼接參數http://m.wzjdgyp.com/post/2713.html<p><span style="text-wrap-mode: nowrap;">CREATE DEFINER=`root`@`%` PROCEDURE `user`(</span></p><p> <span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; IN var_sdate int(11),</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; IN var_edate int(11)</span></p><p><span style="text-wrap-mode: nowrap;">)</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">BEGIN</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">set @wsql=CONCAT(&#39; reg_time &gt;= &#39; ,&nbsp; var_sdate , &#39; and reg_time &lt;= &#39; , var_edate);</span></p><p><span style="text-wrap-mode: nowrap;">set @querysql=CONCAT(&quot;SELECT&nbsp; * FROM user where&quot;, @wsql);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">PREPARE stmt FROM @querysql;</span></p><p><span style="text-wrap-mode: nowrap;">EXECUTE stmt;</span></p><p><span style="text-wrap-mode: nowrap;">DEALLOCATE PREPARE stmt;</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">END</span></p><p><br/></p>Sun, 20 Apr 2025 13:49:10 +0800centos 格式化掛載數據盤http://m.wzjdgyp.com/post/2712.html<p>本示例以CentOS 7.6 64位系統為例,介紹如何在Linux服務器上使用Parted和e2fsprogs工具分區(qū)并格式化數據盤。</p><p><br/></p><p>Linux服務器上掛載的數據盤,建議您采用GPT分區(qū)格式,并采用xfs或者ext4文件系統。</p><p>1、遠程連接Linux服務器,并安裝Parted和e2fsprogs工具。</p><p>a、遠程連接服務器。</p><p>b、運行以下命令,切換為root用戶,并返回根目錄。</p><p>sudo su root</p><p>cd</p><p>c、依次運行以下命令,安裝Parted和e2fsprogs工具。</p><p>安裝Parted工具:</p><p>yum install -y parted</p><p>安裝e2fsprogs工具:</p><p>yum install -y e2fsprogs</p><p><br/></p><p>2、運行以下命令,查看服務器內的數據盤信息。</p><p>fdisk -l</p><p>查看到的數據盤信息。</p><p><br/></p><p>3、使用Parted工具為數據盤進行分區(qū)。</p><p>a、運行以下命令開始分區(qū)。</p><p>parted /dev/vdb1</p><p>b、運行以下命令,設置GPT分區(qū)。</p><p>mklabel gpt</p><p>系統將提示您轉換分區(qū)格式將導致磁盤數據丟失。本文介紹如何處理一塊全新的數據盤,因此輸入Yes即可。</p><p>c、運行以下命令,劃分一個主分區(qū),并設置分區(qū)的開始位置和結束位置。</p><p>mkpart primary 1 100%</p><p>d、運行以下命令,檢查分區(qū)是否對齊。</p><p>align-check optimal 1</p><p>e、運行以下命令,查看分區(qū)表。</p><p>print</p><p>f、運行以下命令,退出Parted工具。</p><p>quit</p><p><br/></p><p>4、運行以下命令,使系統重讀分區(qū)表。</p><p>partprobe</p><p><br/></p><p>5、運行以下命令,為/dev/vdb1分區(qū)創(chuàng)建一個文件系統。</p><p>根據您的需求運行以下任一命令,創(chuàng)建文件系統。</p><p>創(chuàng)建一個ext4文件系統。</p><p>mkfs -t ext4 /dev/vdb1</p><p>創(chuàng)建一個xfs文件系統。</p><p>mkfs -t xfs /dev/vdb1</p><p>本示例中選擇創(chuàng)建ext4文件系統。</p><p><br/></p><p>6、在/etc/fstab文件中寫入新分區(qū)信息,啟動開機自動掛載分區(qū)。</p><p>a、運行以下命令,創(chuàng)建一個名為/data的掛載點。</p><p>mkdir /data</p><p>b、運行以下命令,備份/etc/fstab。</p><p>cp /etc/fstab /etc/fstab.bak</p><p>c、運行以下命令,向/etc/fstab里寫入新分區(qū)信息。</p><p>echo `blkid /dev/vdb1 | awk &#39;{print $2}&#39; | sed &#39;s/\&quot;//g&#39;` /data ext4 defaults 0 0 &gt;&gt; /etc/fstab</p><p>說明/dev/vdb1為數據盤分區(qū)設備名、/data為本示例中自定義的掛載點、ext4表示ext4文件系統,您需要根據實際情況做相應修改。</p><p>d、運行以下命令,查看/etc/fstab的信息。</p><p>cat /etc/fstab</p><p>如果返回結果里出現了寫入的新分區(qū)信息,說明寫入成功。</p><p>e、運行以下命令,使/etc/fstab中掛載數據盤的配置生效。</p><p>mount -a</p><p><br/></p><p>7、運行以下命令,查看目前磁盤空間和使用情況。</p><p>df -h</p><p>如果返回結果里出現新建文件系統的信息,說明掛載成功,您可以使用新的文件系統了。</p><p><br/></p>Fri, 04 Apr 2025 16:35:05 +0800uniapp 微信小程序v-model雙向綁定沖突http://m.wzjdgyp.com/post/2711.html<p><br/></p><p><span style="">&lt;input type=&quot;text&quot; class=&quot;input-text&quot; placeholder=&quot;請?zhí)顚戫椖棵?amp;quot; :value=&quot;info.title&quot; @input=&quot;handleInput&quot; data-model=&quot;title&quot;&gt;</span></p><p><span style=""><br/></span></p><p><span style=""><br/></span></p><p><span style="">handleInput(e) {</span></p><p><span style="">&nbsp; &nbsp;var that = this;</span></p><p><span style="">&nbsp; &nbsp;var name = e.currentTarget.dataset.model;</span></p><p><span style="">&nbsp; &nbsp;that.$set(that, name, e.detail.value);</span></p><p><span style="">},</span></p><p><br/></p>Wed, 02 Apr 2025 15:28:19 +0800uniapp 一個數組賦值給另一個數組后,修改值原有數組變量也會更改http://m.wzjdgyp.com/post/2710.html<p>小程序一個數組賦值給另一個數組后,修改值原有數組變量也會更改</p><p>原因在js代碼中,字符串、數字、布爾、這種稱為基礎類型是可以直接賦值的,即使是修改后也不會影響原來的數據。但是引用類型比如object,array這種就會出現上面描述的問題。</p><p><br/></p><p>解決方法:var data=JSON.parse(JSON.stringify(data));</p><p><br/></p>Mon, 24 Feb 2025 09:25:52 +0800js在當前日期添加天、周、月、年http://m.wzjdgyp.com/post/2709.html<p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//創(chuàng)建date</span></p><p><span style="text-wrap-mode: nowrap;">var nowDate = new Date();</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加天數</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setDate(nowDate.getDate() + 1);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加周 添加周用添加天的方式,來添加七天,即為一周</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setDate(nowDate.getDate() + 7);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加月數</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setMonth(nowDate.getMonth() + 1);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加年數</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setYear(nowDate.getFullYear() + 1);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">打印格式為年月日時分秒</span></p><p><span style="text-wrap-mode: nowrap;">const year = nowDate.getFullYear();</span></p><p><span style="text-wrap-mode: nowrap;">const month = (nowDate.getMonth() + 1).toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const day = nowDate.getDate().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const hours = nowDate.getHours().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const minutes = nowDate.getMinutes().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const seconds = nowDate.getSeconds().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">console.log(`${year}-${month}-${day} ${hours}:${minutes}:${seconds}`);</span></p><p><br/></p>Wed, 11 Dec 2024 17:16:15 +0800centos 禁用php5.6版本eval函數http://m.wzjdgyp.com/post/2708.html<p><span style="text-wrap-mode: nowrap;">不支持PHP8,官方只支持PHP7以下</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">服務器只裝了一個PHP5.6版本,一定要安裝對應的suhosin-0.9.38版本,</span></p><p><span style="text-wrap-mode: nowrap;">測試成功是&nbsp; php5.x: wget https://download.suhosin.org/suhosin-0.9.38.tar.gz</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">一、安裝Suhosin</span></p><p><strong><span style="text-wrap-mode: nowrap;">1、不是寶塔環(huán)境</span></strong></p><p><span style="text-wrap-mode: nowrap;">cd /usr/local/src</span></p><p><span style="text-wrap-mode: nowrap;">wget https://download.suhosin.org/suhosin-0.9.38.tar.gz</span></p><p><span style="text-wrap-mode: nowrap;">tar zxvf suhosin-0.9.38.tar.gz</span></p><p><span style="text-wrap-mode: nowrap;">cd suhosin-0.9.38</span></p><p><span style="text-wrap-mode: nowrap;">/usr/local/php/bin/phpize</span></p><p><span style="text-wrap-mode: nowrap;">./configure --with-php-config=/usr/local/php/bin/php-config</span></p><p><span style="text-wrap-mode: nowrap;">make&nbsp;</span></p><p><span style="text-wrap-mode: nowrap;">make install</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><strong><span style="text-wrap-mode: nowrap;">2、寶塔環(huán)境安裝</span></strong></p><p><span style="text-wrap-mode: nowrap;">cd /usr/local/src</span></p><p><span style="text-wrap-mode: nowrap;">wget https://download.suhosin.org/suhosin-0.9.38.tar.gz</span></p><p><span style="text-wrap-mode: nowrap;">tar zxvf suhosin-0.9.38.tar.gz</span></p><p><span style="text-wrap-mode: nowrap;">cd suhosin-0.9.38</span></p><p><span style="text-wrap-mode: nowrap;">/www/server/php/56/bin/phpize</span></p><p><span style="text-wrap-mode: nowrap;">./configure --with-php-config=/www/server/php/56/bin/php-config</span></p><p><span style="text-wrap-mode: nowrap;">make</span></p><p><span style="text-wrap-mode: nowrap;">make install</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">安裝完成之后,出現下面的界面,說明安裝成功。</span></p><p><span style="text-wrap-mode: nowrap;">/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/&nbsp; #suhosin模塊路徑</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">二、在php.ini下加入suhosin.so即可</span></p><p><span style="text-wrap-mode: nowrap;">extension=suhosin.so</span></p><p><span style="text-wrap-mode: nowrap;">suhosin.executor.disable_eval = on</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">三、測試確定是禁止,運行下面代碼</span></p><p><span style="text-wrap-mode: nowrap;">&lt;?php</span></p><p><span style="text-wrap-mode: nowrap;">eval(&quot;echo&#39;hello world&#39;;&quot;);</span></p><p><span style="text-wrap-mode: nowrap;">?&gt;</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">如果能輸出:hello world,說明沒有禁用,</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">如果什么都看不到或報錯,說明正確,已經禁用</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">如果還是看的到,重啟下服務器。</span></p><p><br/></p>Sat, 02 Nov 2024 10:16:52 +0800 定州市| 东方市| 沧州市| 滦南县| 泗阳县| 田林县| 荣昌县| 墨江| 蓝山县| 新邵县| 峡江县| 融水| 柳州市| 弥勒县| 蚌埠市| 平乡县| 芜湖市| 鹰潭市| 边坝县| 南皮县| 青州市| 墨竹工卡县| 修文县| 庆城县| 行唐县| 河南省| 沙坪坝区| 万全县| 嘉善县| 建阳市| 丹阳市| 东阳市| 璧山县| 南靖县| 巢湖市| 濮阳市| 安福县| 灵石县| 读书| 彩票| 卓尼县|