PIXNET Logo登入

Hello World

跳到主文

:D

部落格全站分類:生活綜合

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 8月 25 週一 201418:32
  • 使用php計算某日是幾天後

使用php計算某日是幾天後
<?php
//未來日期的時間戳記
$exp = @strtotime($argv[1]);
//今天的時間戳記
$today = @strtotime(@date("Ymd"));
//相差的時間戳記除以86400
$days = (($exp-$today)/86400);
//即可得到未來的時間是幾天後
echo $days;
?>
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(142)

  • 個人分類:系統管理
▲top
  • 8月 17 週日 201413:13
  • 在cisco switch 限制可以上網的clinet mac address

conf t
int gi0/1
 switchport mode access
 switchport port-security
 switchport port-security violation protect
 switchport port-security mac-address xxxx.xxxx.xxxx
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(161)

  • 個人分類:系統管理
▲top
  • 6月 23 週一 201417:24
  • Nessus出現Your client sent a request this server does not understand

如果出現這個錯誤訊息,試著把你的網址從原本的http://hostname:8834/ 換成 https://hostname:8834/ 看看
HTTP/1.1 400 Bad Request
Date: Mon, 23 Jun 2014 09:23:58 GMT
Server: NessusWWW
Connection: close
Expires: Mon, 23 Jun 2014 09:23:58 GMT
Content-Length: 208
Content-Type: text/html
X-Frame-Options: DENY
Cache-Control:
Expires: 0
Pragma :
400 Bad Request
Bad Request
Your client sent a request this server does not understand
Connection closed by foreign host.
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(61)

  • 個人分類:系統管理
▲top
  • 6月 20 週五 201417:19
  • 設定vmware esx 開機後 自動啟動 guest os

vmware Automatic Startup1. 登入 vSphere Client
2. Configuration -> Virtual Machine Startup/Shutdown -> Properties
3. Allow virtual machines to start and stop automatically with the system 打勾
4. 將要自動開機的guest os從Manual Startup 往上移到 Automatic Startup
5. OK
 
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(1,082)

  • 個人分類:系統管理
▲top
  • 6月 09 週一 201416:10
  • sftp出現Received message too long 825373450錯誤訊息

[testuser@ms122] ~> sftp testuser@127.0.0.1
Password:
Received message too long 825373450
可以查看一下 .cshrc 下面是不是有類似 echo xxx 輸入螢幕的關鍵字
把這幾行移除即可
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(33)

  • 個人分類:系統管理
▲top
  • 6月 03 週二 201414:53
  • postfix查不到寄件者網域時->退信

編輯 main.cf
找到這一段,在最後補上reject_unknown_sender_domain
smtpd_sender_restrictions =
    XXXXX
    ,XXXXX
    ,XXXXX
    ,XXXXX
    ,reject_unknown_sender_domain
配合以下的參數可以回應450或是550,建議改成450,如果當下DNS查詢不到時,對方還會繼續retry
unknown_address_reject_code = 450
重新啟動postfix
收到郵件的時候會去查詢DNS,如果查不到紀錄會出現下列的maillog
Jun  3 14:31:20 <mail.info> ms122 postfix/smtpd[89899]: NOQUEUE: reject: RCPT from unknown[219.xx.xx.253]: 550 5.1.8 <sjdhfjshjfj@huufehguerg.tw>: Sender address rejected: Domain not found; from=<sjdhfjshjfj@huufehguerg.tw> to=<test@example.com> proto=ESMTP helo=<om91.example.com>
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(810)

  • 個人分類:系統管理
▲top
  • 5月 26 週一 201417:58
  • warning - no DB_CONFIG file found in directory /var/lib/ldap

# slapcat
bdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2).
for example in CentOS 6
cd /usr/share/openldap-servers/
cp DB_CONFIG.example /var/lib/ldap/DB_CONFIG
chown ldap.ldap /var/lib/ldap/DB_CONFIG
/etc/init.d/slapd restart
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(130)

  • 個人分類:系統管理
▲top
  • 5月 05 週一 201400:12
  • 大量批次建立FreeBSD帳號

echo 123 | pw useradd -n gogogo1 -c 'hhh hhh' -g mmm -d /home/mmm/gogogo1 -s /sbin/nologin -m -h 0
新增帳號gogogo1
名字是hhh hhh
群組 mmm
家目錄 /home/mmm/gogogo1
shell: /sbin/nologin
並設定密碼為 123
echo 123 | pw mod user peter -h 0
將peter密碼改為123
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(137)

  • 個人分類:系統管理
▲top
  • 4月 21 週一 201415:45
  • Invalid command 'SSLPassPhraseDialog'

 # apachectl restart
Performing sanity check on apache24 configuration:
AH00526: Syntax error on line 56 of /usr/local/etc/apache24/extra/httpd-ssl.conf:
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration
 # vi httpd.conf
LoadModule ssl_module libexec/apache24/mod_ssl.so
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(733)

  • 個人分類:系統管理
▲top
  • 4月 15 週二 201415:42
  • 命令模式下修改netapp nfs 分享權限

undefined命令模式下修改netapp nfs 分享權限
#執行 rdfile 查看目前分享的權限
2240-1> rdfile /etc/exports
/vol/sharedir   -sec=sys,ro=10.8.9.0/24,rw=10.8.9.243:10.8.9.241,anon=0,nosuid
#如果還有另一台client:10.8.9.55 需要存取 sharedir 目錄的話,把上述的結果貼在記事本編輯後,再執行wrfile並把剛剛編輯過的文字貼上去
2240-1> wrfile /etc/exports
/vol/sharedir   -sec=sys,ro=10.8.9.0/24,rw=10.8.9.243:10.8.9.241:10.8.9.55,anon=0,nosuid
最後按ctrl+c 離開
#最後重新讀取設定檔
2240-1> exportfs -a
【Synology】DS718+ 網路儲存伺服器+WD紅標 WD40EFRX (4TBX2)
 
(繼續閱讀...)
文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣(905)

  • 個人分類:系統管理
▲top
«1...36373844»

momo shop

近期文章

  • 阻擋偽造老闆名字發的詐騙信
  • 解決連線網路印表機錯誤 0x00000709
  • 解決HP筆記型電腦無法從win10升級至win11問題
  • windows 11 找不到列印至PDF 印表機
  • 無線網路的網卡mac address 會變耶
  • 解決 umount 出現 target is busy.
  • 解決rsync 同步錯誤訊息
  • 透過cmd命令模式調整windows 時區
  • 解決M365會議室資源只顯示忙碌
  • 解決 MacOS 連 forticlient 錯誤訊息

誰來我家

我的地盤

helloworld
暱稱:
helloworld
分類:
生活綜合
好友:
累積中
地區:

文章分類

  • 遊記 (24)
  • 系統管理 (438)
  • 吃吃吃 (29)
  • 工商服務 (95)
  • 資料庫 (45)
  • 未分類文章 (1)

參觀人氣

  • 本日人氣:
  • 累積人氣:

pixGoogleAdsense1

pixGoogleAdsense2

留言板