技術事業群-研發五處-帳號研發部-帳研B組Eric_Tu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
PHP === 無引號 : 宣告為 integer 單引號 : 宣告為 string 雙引號 : 宣告為 string 並可帶入參數 ``` //數字 integer 74 $test123 = 123; //字串 string 75 $test1 = '$test123';~ //參數 string 可帶參數 76 $test2 = "$test123";~ 77 ~ 78 dump($test1);~ 79 dump($test2);~ ``` 輸出結果 ``` BankController.php on line 78: "$test123" BankController.php on line 79: "123" ``` # set date 如何校時 sudo yum install ntp ``` Dependencies Resolved ============================================================================================================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================================================================================================== Installing: ntp x86_64 4.2.6p5-25.el7.centos.2 updates 547 k Installing for dependencies: autogen-libopts x86_64 5.18-5.el7 base 66 k ntpdate x86_64 4.2.6p5-25.el7.centos.2 updates 86 k Transaction Summary ============================================================================================================================================================================================================================================================================== Install 1 Package (+2 Dependent packages) Total download size: 699 k Installed size: 1.6 M Is this ok [y/d/N]: y Downloading packages: autogen-libopts-5.18-5.el7.x86 FAILED http://repo.virtualhosting.hk/centos/7.3.1611/os/x86_64/Packages/autogen-libopts-5.18-5.el7.x86_64.rpm: [Errno 14] HTTP Error 503 - Service Unavailable ] 0.0 B/s | 0 B --:--:-- ETA Trying other mirror. (1/3): ntpdate-4.2.6p5-25.el7.centos.2.x86_64.rpm | 86 kB 00:00:01 (2/3): ntp-4.2.6p5-25.el7.centos.2.x86_64.rpm | 547 kB 00:00:01 (3/3): autogen-libopts-5.18-5.el7.x86_64.rpm | 66 kB 00:00:01 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 489 kB/s | 699 kB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : autogen-libopts-5.18-5.el7.x86_64 1/3 Installing : ntpdate-4.2.6p5-25.el7.centos.2.x86_64 2/3 Installing : ntp-4.2.6p5-25.el7.centos.2.x86_64 3/3 Verifying : ntp-4.2.6p5-25.el7.centos.2.x86_64 1/3 Verifying : ntpdate-4.2.6p5-25.el7.centos.2.x86_64 2/3 Verifying : autogen-libopts-5.18-5.el7.x86_64 3/3 Installed: ntp.x86_64 0:4.2.6p5-25.el7.centos.2 Dependency Installed: autogen-libopts.x86_64 0:5.18-5.el7 ntpdate.x86_64 0:4.2.6p5-25.el7.centos.2 Complete! [eric_tu@localhost eric_tu]$ timedatectl Local time: 五 2017-06-16 23:50:22 CST Universal time: 五 2017-06-16 15:50:22 UTC RTC time: 一 2017-06-19 06:44:26 Time zone: Asia/Taipei (CST, +0800) NTP enabled: no NTP synchronized: no RTC in local TZ: no DST active: n/a ``` chkconfig ntpd on 設定系統和 time.stdtime.gov.tw 同步 (我們以time.stdtime.gov.tw為例) ntpdate time.stdtime.gov.tw 啟動ntp service ntpd start 6.可以執行下面的指令確定目前系統的時間 date CST可以指: 下列的時區: 大中華地區時區 北京時間,China Standard Time 中原標準時間,Chungyuan Standard Time 澳洲中部時間,Central Standard Time (Australia) 中部標準時區(北美洲),Central Standard Time (North America) 古巴標準時間,Cuba Standard Time,參見北美東部時區 --- 世界協調時間,又稱世界標準時間或協調世界時,簡稱UTC(英文「Coordinated Universal Time」/法文「Temps Universel Coordonné」),是最主要的世界時間標準,其以原子時秒長為基礎,在時刻上儘量接近於格林威治標準時間。中華民國採用CNS 7648的《資料元及交換格式–資訊交換–日期及時間的表示法》(與ISO 8601類似)稱之爲世界協調時間。中華人民共和國採用ISO 8601:2000的國家標準GB/T 7408-2005《數據元和交換格式 信息交換 日期和時間表示法》中亦稱之為協調世界時。 --- Xshell connect fail 解決方法: 查看shh 狀態 重啟看看 還是不行 查IP 發現IP換了 所以去xshell session重新設定。(今天網路掛了,重開之後區網IP有更動) ``` [eric_tu@localhost eric_tu]$ sudo service sshd status sudo: /var/db/sudo/eric_tu writable by non-owner (040770), should be mode 0700 We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for eric_tu: Redirecting to /bin/systemctl status sshd.service ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) Active: active (running) since 一 2017-06-19 15:03:20 CST; 4min 30s ago Docs: man:sshd(8) man:sshd_config(5) Main PID: 2245 (sshd) CGroup: /system.slice/sshd.service └─2245 /usr/sbin/sshd -D 6月 19 15:03:20 localhost.localdomain systemd[1]: Starting OpenSSH server daemon... 6月 19 15:03:20 localhost.localdomain sshd[2245]: Server listening on 0.0.0.0 port 22. 6月 19 15:03:20 localhost.localdomain sshd[2245]: Server listening on :: port 22. 6月 19 15:03:20 localhost.localdomain systemd[1]: Started OpenSSH server daemon. 6月 19 15:05:47 localhost.localdomain sshd[2267]: Accepted publickey for eric_tu from 192.168.171.1 port...:d5 6月 19 15:06:19 localhost.localdomain sshd[2299]: Accepted publickey for eric_tu from 192.168.171.1 port...:d5 6月 19 15:06:35 localhost.localdomain sshd[2333]: Accepted publickey for eric_tu from 192.168.171.1 port...:d5 Hint: Some lines were ellipsized, use -l to show in full. ``` 查IP ``` [eric_tu@localhost eric_tu]$ ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:44:07:46 brd ff:ff:ff:ff:ff:ff inet 192.168.171.129/24 brd 192.168.171.255 scope global dynamic eno16777736 valid_lft 1310sec preferred_lft 1310sec inet6 fe80::20c:29ff:fe44:746/64 scope link valid_lft forever preferred_lft forever ``` # ID有動過 記得要去 C:\Windows\System32\drivers\etc\hosts 設定對應的DNS MAP http://blog.miniasp.com/post/2008/08/25/Modify-hosts-file-to-change-Domain-Name-IP-Mapping.aspx --- # mysql ``` [eric_tu@localhost ~]$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) ``` ``` [eric_tu@localhost ~]$ mysql -u eric_tu -h 127.0.0.1 -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.7.18 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ``` mysql> show databases; mysql> use Msgboard; show status; ``` Remaining deprecation notices (9) Using a colon that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}" is deprecated since version 3.2 and will throw a ParseException in 4.0: 9x 9x in BankControllerTest::testIndexAction from AppBundle\Entity ``` https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/issues/343 https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/commit/ddc8c148a91d40c2810181f276635e7962d13f38 --- http://blog.faq-book.com/?p=1917 https://stackoverflow.com/questions/31067135/in-centos7-can-not-start-mysql Check /etc/init.d/ for your mysql service name and then service mysql_service_name start On centos it is either: service mysqld start or for MariaDB: service mariadb start --- http://note.drx.tw/2012/12/mysql-syntax.html http://www.1keydata.com/tw/sql/sqlselect.html

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully