huangtzutzu
    • 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
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

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

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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
    • Note Insights New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

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

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: PHP6 -VS CODE 開始 tags: PHP --- http://localhost:8012/phpmyadmin/tbl_sql.php?db=2022030501&table=%E5%AD%B8%E7%94%9F%E8%B3%87%E6%96%99 C:\xampp\htdocs\myphp ![](https://i.imgur.com/Inndf7Q.png) 邏輯運算子 ==等於 === 全等 ! 不是 要把下面兩個都打開.網頁才可以打開 ![](https://i.imgur.com/k4X3Lt7.png) ![](https://i.imgur.com/ukKNpUh.png) http://localhost:8012/myphp/0312-01.php ![](https://i.imgur.com/mQPpliG.png) --- unset 是指 移除變數 ![](https://i.imgur.com/quIj4Yb.png) --- if 判斷式 http://localhost:8012/myphp/0319-01.php ![](https://i.imgur.com/xnm9nfJ.png) ![](https://i.imgur.com/qlnoXSm.png) ![](https://i.imgur.com/0xqJbRa.png) ```` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <?php $mynum = 100; if($mynum == 100){ echo "很棒喔~滿分100分"; } ?> </body> </html> ```` --- if +else 否則就..... ![](https://i.imgur.com/fkPzTRz.png) ![](https://i.imgur.com/2KOIZIm.png) --- if +else if+ else ![](https://i.imgur.com/DMlkVVu.png) --- 排好=格式化文件 =shift+alt+f ![](https://i.imgur.com/m3H5eFK.png) ![](https://i.imgur.com/SRRY9oG.png) ![](https://i.imgur.com/vZMHe3N.png) ```` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <?php $mynum = 22; if ($mynum == 100) { echo "很棒喔~滿分100分"; } else if ($mynum >= 60) { echo "恭喜及格"; } else { echo "不及格 =補考"; } ?> </body> </html> ```` 兩個等號才是相等 ![](https://i.imgur.com/jZ7VZXg.png) --- 這樣寫0會出現不及格..但是不會寫補考...所以有錯... ![](https://i.imgur.com/nUREelI.png) ![](https://i.imgur.com/2BDSrVC.png) --- ![](https://i.imgur.com/RMp7Etn.png) ![](https://i.imgur.com/Xyx3CR5.png) --- 產生前端 語法- ![](https://i.imgur.com/98aQ9KV.png) --- 現在想要做出來的成果- ![](https://i.imgur.com/ZoGhxqk.jpg) --- 程式碼- ```` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <?php if(!isset($h)){$h=1.72;} if(!isset($w)){$w=60;} $bmi = round($w/($h*$h),1); echo "<br>"; if($bmi >=30 ){$status = "肥胖!";} elseif ($bmi >=25 ){$status = "過重!";} elseif ($bmi >=18.5 ){$status = "標準!";} else{$status = "過輕!";} ?> <div> <p>您的身高是:<?php echo $h*100; ?></p> <p>您的體重是:<?php echo $w; ?>公斤</p> <p>您的BMI數值是:<?php echo $bmi; ?></p> <p>您的BMI判斷標準為:<?php echo $status; ?></p> </div> </body> </html> ```` ![](https://i.imgur.com/p3brjg6.png) ![](https://i.imgur.com/GcLiFkK.png) --- 判斷式- 判斷是否為 文字 is_string() / 數字 is_numeric() /整數 is_int() --- 成績 要做出來的成果 ![](https://i.imgur.com/91Z6CKf.jpg) ```` ```` --- switch ![](https://i.imgur.com/NCXZfUl.png) if 的 都 可以寫成 switch ![](https://i.imgur.com/XQzENCf.png) --- while 迴圈 - 執行重複動作 -跑了10次 **注意邏輯..最怕無窮迴圈** ![](https://i.imgur.com/zABiR0n.png) ```` ```` --- do while 迴圈 - ![](https://i.imgur.com/fuSUjmT.jpg) ```` ```` --- for 迴圈 - 嚴謹 ![](https://i.imgur.com/qGvD6Zg.png) ![](https://i.imgur.com/mx9adOd.jpg) ```` ```` --- 放10張圖檔在自己的myphp 裡面- C:\xampp\htdocs\myphp ![](https://i.imgur.com/kK343ro.png) ![](https://i.imgur.com/TiZWHtL.png) 網頁裡面的/是這個方向 會跟複製的相反 ![](https://i.imgur.com/2kzew8P.png) ![](https://i.imgur.com/7Gz8Vgw.png) 加入FOR 迴圈 讓照片1-10顯示 -用3行取代很多行 ```` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <!--<img src="pic1/1.jpg"> //外面是2個" --> <?php //<img src="pic1/1.jpg"> //外面是2個" for ($a = 1 ;$a <= 10 ; $a ++ ){ echo"<img src='pic1/$a.jpg'>"; //裡面是一個' } ?> </body> </html> ```` ![](https://i.imgur.com/uQx1RyG.jpg) --- 在BODY 下面 怎麼不能用 // 註解 ![](https://i.imgur.com/tuD3C1R.png) 要用 ```` body裡面註解是 <!-- --> ```` ![](https://i.imgur.com/AOYgPwy.png) --- HTML的註解長這樣 在VS CODE 也可以按 CTRL +L 會加上相對位置的註解 ```` body裡面註解是 <!-- --> css註解 /* */ js註解是 // ```` --- 再放入100張圖- C:\xampp\htdocs\myphp ![](https://i.imgur.com/qRG9vJX.png) http://localhost:8012/myphp/0319-04.php \n 代表程式碼換行- ```` ```` 另外一種寫法- 之後只要改資料夾名稱- ```` ```` --- ```` ```` --- 抓100張照片方法1 ![](https://i.imgur.com/BtHosL2.jpg) 抓100張照片方法2 ![](https://i.imgur.com/0Hy3rwS.jpg) ---- 其他- ![](https://i.imgur.com/uIcjm45.jpg) 把不規則 檔案全部抓進來的方法- ![](https://i.imgur.com/JD81hAv.jpg) --- 面試必考題 9×9法表 ```` ```` 用 FOR 迴圈 試試 ```` ```` ---

    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
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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