原创 mysql對一個表 修改刪除新增某列

 刪除某幾列 alter table data drop column coupon_start_time,drop column coupon_end_time 插入某幾列 alter table `coupon_template

原创 mysql報1364錯誤

可以在my.cnf 註釋掉以下這段代碼 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 如果沒有這句話就加上 sql-mode="NO_AUTO_Create_USER,NO_

原创 去除git diff 時出現的 ^M

去除git diff 時出現的 ^M git config --global core.whitespace cr-at-eol git reset –hard id 回退版本

原创 mysql設置訪問權限 ip段

create user 'user'@'192.168.1.%' identified by '******';grant all privileges on `database`.* to 'user'@'192.168.1.%' wi

原创 nginx配置HTTPS 訪問PHP空白解決方案

#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/e

原创 解決python with 在寫入文件是因編碼格式不同而造成亂碼問題

解決with操作問價亂碼問題讀取的時候可以設置字符串格式 decode('utf-8')讀取文件寫入的時候可以設置成 str.encode('utf-8')如果不行可以設置一下 with的第三個參數 encoding='utf-8'例如:

原创 mysql 數據庫建表時 時間類型上的錯誤

[Err] 1067 - Invalid default value for 'date'mysql創建表時遇到 1067錯誤類型 通常是日期中天或月份爲零 把零改成1 -31之間(特殊月份除外)再次運行即可解決問題create tab

原创 python 解決ip自動獲取 虛擬域名訪問不到

# 開機自動更改ip hosts 和 httpd-vhtosts 兩個文件 import os import socket import codecs import re # 加入開機啓動 %APPDATA%\Microsoft\Wi

原创 mysql 1045錯誤

mysql 5.7以上執行修改密碼時可能會產生一個錯誤1055[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains non

原创 pip 報 Fatal error in launcher: Unable to create process using 肯定好使

當使用pip安裝擴展是報Fatal error in launcher: Unable to create process using '""d:\program files (x86)\python\python.exe"  "D:\P

原创 php mysql導出Excel格式

<?php header('Content-Type: application/vnd.ms-excel'); header('Content-Type: application/octet-stream'); header('Ca