Nginx允许跨域

location / {add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Acc...

阅读全文



MYSQL筛选英文/中文字段

MYSQL筛选中文字段select * from table where not name regexp '^[1-9A-Za-z]'; MYSQL筛选英文字段SELECT column_name FROM `table_name` WHERE colu...

阅读全文



MYSQL刪除重複數據

根據單列刪除且保留ID最小的一條delete from `pictures` where `内容` in(select `内容` from (select `内容` from `pictures` group by `内容` having count(`...

阅读全文



將SQL查詢結果循環顯示,但最後一條數據顯示額外的結構

<?php $servername = "localhost"; $username = "root"; $password = "root"; $dbname = "test&...

阅读全文



PHP如何在json里嵌套一個json

在網上看到這篇文章,轉載來記錄下,估計會用到。常見需求:把一個父欄目下的子欄目循環出來,每個子欄目下再顯示最新的幾篇內容。<?php $servername = "localhost"; $username = "ro...

阅读全文