├── .DS_Store ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md └── workflows │ └── main.yml ├── .gitignore ├── .idea ├── .gitignore ├── modules.xml ├── php.iml ├── php.xml └── vcs.xml ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── docs ├── .DS_Store ├── .vitepress │ ├── cache │ │ └── deps │ │ │ ├── _metadata.json │ │ │ ├── chunk-YW53L7UT.js │ │ │ ├── chunk-YW53L7UT.js.map │ │ │ ├── package.json │ │ │ ├── vitepress___@vue_devtools-api.js │ │ │ ├── vitepress___@vue_devtools-api.js.map │ │ │ ├── vitepress___@vueuse_integrations_useFocusTrap.js │ │ │ ├── vitepress___@vueuse_integrations_useFocusTrap.js.map │ │ │ ├── vitepress___mark__js_src_vanilla__js.js │ │ │ ├── vitepress___mark__js_src_vanilla__js.js.map │ │ │ ├── vitepress___minisearch.js │ │ │ ├── vitepress___minisearch.js.map │ │ │ ├── vue.js │ │ │ └── vue.js.map │ ├── config.mjs │ ├── dist │ │ ├── 404.html │ │ ├── api-examples.html │ │ ├── assets │ │ │ ├── api-examples.md.d9188294.js │ │ │ ├── api-examples.md.d9188294.lean.js │ │ │ ├── app.c51039d5.js │ │ │ ├── chunks │ │ │ │ ├── framework.bfb2b7b2.js │ │ │ │ └── theme.f054955a.js │ │ │ ├── index.md.2db9725f.js │ │ │ ├── index.md.2db9725f.lean.js │ │ │ ├── inter-italic-cyrillic-ext.33bd5a8e.woff2 │ │ │ ├── inter-italic-cyrillic.ea42a392.woff2 │ │ │ ├── inter-italic-greek-ext.4fbe9427.woff2 │ │ │ ├── inter-italic-greek.8f4463c4.woff2 │ │ │ ├── inter-italic-latin-ext.bd8920cc.woff2 │ │ │ ├── inter-italic-latin.bd3b6f56.woff2 │ │ │ ├── inter-italic-vietnamese.6ce511fb.woff2 │ │ │ ├── inter-roman-cyrillic-ext.e75737ce.woff2 │ │ │ ├── inter-roman-cyrillic.5f2c6c8c.woff2 │ │ │ ├── inter-roman-greek-ext.ab0619bc.woff2 │ │ │ ├── inter-roman-greek.d5a6d92a.woff2 │ │ │ ├── inter-roman-latin-ext.0030eebd.woff2 │ │ │ ├── inter-roman-latin.2ed14f66.woff2 │ │ │ ├── inter-roman-vietnamese.14ce25a6.woff2 │ │ │ ├── markdown-examples.md.3f5df2fb.js │ │ │ ├── markdown-examples.md.3f5df2fb.lean.js │ │ │ └── style.3766ac4a.css │ │ ├── hashmap.json │ │ ├── index.html │ │ └── markdown-examples.html │ └── theme │ │ ├── index.js │ │ └── style.css ├── class-02.md ├── class-03.md ├── class-04.md ├── class-05.md ├── class-06.md ├── class-07.md ├── class-08.md ├── class-09.md ├── class-10.md ├── class-11.md ├── class-12.md ├── getting-started │ ├── install-php.md │ ├── php-tags.md │ └── what-is-php.md ├── index.md ├── php-fundamentals │ ├── comments.md │ ├── constant.md │ ├── types-of-data-in-php.md │ └── variables.md ├── public │ ├── .DS_Store │ ├── class-8-part-1.png │ ├── class-8-part-2.png │ ├── class-8-part-3.png │ ├── class-9-part-1.png │ ├── class-9-part-2.png │ ├── class-9-part-3.png │ ├── class-9-part-4.png │ ├── class-9-part-5.png │ ├── get-method-output-on-url.png │ ├── html-special-chars-executed-success.png │ ├── html-special-chars-execution.png │ ├── image-gallery-final-look.png │ ├── image-gallery-first-look.png │ ├── input-data.png │ ├── logo-large.webp │ └── not-found-page.png └── team.md ├── package-lock.json └── package.json /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/.DS_Store -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Application 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | 7 | jobs: 8 | create-deployment-artifacts: 9 | name: Create deployment artifacts 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@master 13 | - uses: actions/setup-node@master 14 | - run: npm install 15 | - run: npm run docs:build 16 | - run: tar -czvf dist_app.tar.gz docs 17 | - uses: actions/upload-artifact@v3 18 | with: 19 | name: dist_app 20 | path: dist_app.tar.gz 21 | 22 | prepare-release-on-servers: 23 | name: Upload file on Server 24 | runs-on: ubuntu-latest 25 | needs: create-deployment-artifacts 26 | steps: 27 | - uses: actions/download-artifact@v2 28 | with: 29 | name: dist_app 30 | 31 | - name: Upload 32 | uses: appleboy/scp-action@master 33 | with: 34 | host: polashmahmud.com 35 | username: deploy 36 | port: 22 37 | key: ${{ secrets.SSH_PRIVATE_KEY }} 38 | source: dist_app.tar.gz 39 | target: /home/deploy 40 | 41 | remove-dist-folder-on-server: 42 | name: Delete dist folder on server 43 | runs-on: ubuntu-latest 44 | needs: prepare-release-on-servers 45 | steps: 46 | - uses: appleboy/ssh-action@master 47 | with: 48 | host: polashmahmud.com 49 | username: deploy 50 | port: 22 51 | key: ${{ secrets.SSH_PRIVATE_KEY }} 52 | script: | 53 | cd php 54 | rm -r docs 55 | extract-new-dist-folder-on-server: 56 | name: Extract new dist folder 57 | runs-on: ubuntu-latest 58 | needs: remove-dist-folder-on-server 59 | steps: 60 | - uses: appleboy/ssh-action@master 61 | with: 62 | host: polashmahmud.com 63 | username: deploy 64 | key: ${{ secrets.SSH_PRIVATE_KEY }} 65 | port: 22 66 | script: | 67 | tar xzf /home/deploy/dist_app.tar.gz -C /home/deploy/php 68 | rm -r dist_app.tar.gz 69 | cleanup_job: 70 | name: Cleanup Job 71 | needs: prepare-release-on-servers 72 | runs-on: ubuntu-latest 73 | steps: 74 | - uses: geekyeggo/delete-artifact@v1 75 | with: 76 | name: dist_app -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /docs/.vitepress/cache/deps/_metadata.json -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/php.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/php.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 13 | 14 | 15 | 17 | 18 | 20 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | polashmahmud@gmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Polash Mahmud 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # পিএইচপি বেসিক কোর্স 2 | (একটি বিগেনার ফ্রেন্ডলি পিএইচপি কোর্স) 3 | 4 | বাংলা ভাষায় সহজ করে, আমরা পিএইচপি এর উপর একটা ডকুমেন্টেশন তৈরি করেছি। আমরা চেষ্টা করেছি, যে সকল বিষয়গুলো বেশি ব‍্যবহার করা হয়, সেগুলোকে ডকুমেন্টে তুলে ধরবার। এটা আমাদের পিএইচপি বেসিক কোর্সের ডকুমেন্টেশন রিপোজিটরি। 5 | 6 | 7 | ## প্রয়োজনীয় সফটওয়্যার 8 | 9 | এই প্রজেক্ট চালানোর জন্য নিম্নলিখিত সফটওয়্যার গুলির প্রয়োজন: 10 | 11 | - [Node.js](https://nodejs.org/) version 18 or higher. 12 | - Terminal for accessing VitePress via its command line interface (CLI). 13 | - Text Editor with [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax support. 14 | - [VSCode](https://code.visualstudio.com/) is recommended, along with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar). 15 | 16 | ## ইনস্টলেশন 17 | 18 | 1. এই রিপোজিটরি ক্লোন করুন: 19 | 20 | ```bash 21 | git clone https://github.com/polashmahmud/php.git 22 | ``` 23 | 24 | ```bash 25 | npm install && npm run docs:dev 26 | ``` 27 | 28 | ## যোগাযোগ 29 | 30 | যদি আপনার কোন প্রশ্ন বা মন্তব্য থাকে, তবে অনুগ্রহ করে তা আমাদের [ইস্যু ট্র্যাকার](https://github.com/polashmahmud/php/issues) এ পোস্ট করুন। 31 | 32 | ## লাইসেন্স 33 | 34 | এই প্রজেক্টটি [MIT লাইসেন্স](https://chat.openai.com/c/LICENSE) এর অধীনে প্রকাশ করা হয়েছে। 35 | 36 | দয়া করে এই ডকুমেন্টেশনটি সঠিকভাবে পড়ে সেটিকে উপযুক্তভাবে ব্যবহার করুন। 37 | -------------------------------------------------------------------------------- /docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.DS_Store -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "29e1b1de", 3 | "browserHash": "d870b4f8", 4 | "optimized": { 5 | "vue": { 6 | "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", 7 | "file": "vue.js", 8 | "fileHash": "6713532c", 9 | "needsInterop": false 10 | }, 11 | "vitepress > @vue/devtools-api": { 12 | "src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js", 13 | "file": "vitepress___@vue_devtools-api.js", 14 | "fileHash": "a1c4526d", 15 | "needsInterop": false 16 | }, 17 | "vitepress > @vueuse/integrations/useFocusTrap": { 18 | "src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs", 19 | "file": "vitepress___@vueuse_integrations_useFocusTrap.js", 20 | "fileHash": "620ff759", 21 | "needsInterop": false 22 | }, 23 | "vitepress > mark.js/src/vanilla.js": { 24 | "src": "../../../../node_modules/mark.js/src/vanilla.js", 25 | "file": "vitepress___mark__js_src_vanilla__js.js", 26 | "fileHash": "9601a3a8", 27 | "needsInterop": false 28 | }, 29 | "vitepress > minisearch": { 30 | "src": "../../../../node_modules/minisearch/dist/es/index.js", 31 | "file": "vitepress___minisearch.js", 32 | "fileHash": "db2162d2", 33 | "needsInterop": false 34 | } 35 | }, 36 | "chunks": { 37 | "chunk-YW53L7UT": { 38 | "file": "chunk-YW53L7UT.js" 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js: -------------------------------------------------------------------------------- 1 | // node_modules/@vue/devtools-api/lib/esm/env.js 2 | function getDevtoolsGlobalHook() { 3 | return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; 4 | } 5 | function getTarget() { 6 | return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; 7 | } 8 | var isProxyAvailable = typeof Proxy === "function"; 9 | 10 | // node_modules/@vue/devtools-api/lib/esm/const.js 11 | var HOOK_SETUP = "devtools-plugin:setup"; 12 | var HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; 13 | 14 | // node_modules/@vue/devtools-api/lib/esm/time.js 15 | var supported; 16 | var perf; 17 | function isPerformanceSupported() { 18 | var _a; 19 | if (supported !== void 0) { 20 | return supported; 21 | } 22 | if (typeof window !== "undefined" && window.performance) { 23 | supported = true; 24 | perf = window.performance; 25 | } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) { 26 | supported = true; 27 | perf = global.perf_hooks.performance; 28 | } else { 29 | supported = false; 30 | } 31 | return supported; 32 | } 33 | function now() { 34 | return isPerformanceSupported() ? perf.now() : Date.now(); 35 | } 36 | 37 | // node_modules/@vue/devtools-api/lib/esm/proxy.js 38 | var ApiProxy = class { 39 | constructor(plugin, hook) { 40 | this.target = null; 41 | this.targetQueue = []; 42 | this.onQueue = []; 43 | this.plugin = plugin; 44 | this.hook = hook; 45 | const defaultSettings = {}; 46 | if (plugin.settings) { 47 | for (const id in plugin.settings) { 48 | const item = plugin.settings[id]; 49 | defaultSettings[id] = item.defaultValue; 50 | } 51 | } 52 | const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; 53 | let currentSettings = Object.assign({}, defaultSettings); 54 | try { 55 | const raw = localStorage.getItem(localSettingsSaveId); 56 | const data = JSON.parse(raw); 57 | Object.assign(currentSettings, data); 58 | } catch (e) { 59 | } 60 | this.fallbacks = { 61 | getSettings() { 62 | return currentSettings; 63 | }, 64 | setSettings(value) { 65 | try { 66 | localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); 67 | } catch (e) { 68 | } 69 | currentSettings = value; 70 | }, 71 | now() { 72 | return now(); 73 | } 74 | }; 75 | if (hook) { 76 | hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => { 77 | if (pluginId === this.plugin.id) { 78 | this.fallbacks.setSettings(value); 79 | } 80 | }); 81 | } 82 | this.proxiedOn = new Proxy({}, { 83 | get: (_target, prop) => { 84 | if (this.target) { 85 | return this.target.on[prop]; 86 | } else { 87 | return (...args) => { 88 | this.onQueue.push({ 89 | method: prop, 90 | args 91 | }); 92 | }; 93 | } 94 | } 95 | }); 96 | this.proxiedTarget = new Proxy({}, { 97 | get: (_target, prop) => { 98 | if (this.target) { 99 | return this.target[prop]; 100 | } else if (prop === "on") { 101 | return this.proxiedOn; 102 | } else if (Object.keys(this.fallbacks).includes(prop)) { 103 | return (...args) => { 104 | this.targetQueue.push({ 105 | method: prop, 106 | args, 107 | resolve: () => { 108 | } 109 | }); 110 | return this.fallbacks[prop](...args); 111 | }; 112 | } else { 113 | return (...args) => { 114 | return new Promise((resolve) => { 115 | this.targetQueue.push({ 116 | method: prop, 117 | args, 118 | resolve 119 | }); 120 | }); 121 | }; 122 | } 123 | } 124 | }); 125 | } 126 | async setRealTarget(target) { 127 | this.target = target; 128 | for (const item of this.onQueue) { 129 | this.target.on[item.method](...item.args); 130 | } 131 | for (const item of this.targetQueue) { 132 | item.resolve(await this.target[item.method](...item.args)); 133 | } 134 | } 135 | }; 136 | 137 | // node_modules/@vue/devtools-api/lib/esm/index.js 138 | function setupDevtoolsPlugin(pluginDescriptor, setupFn) { 139 | const descriptor = pluginDescriptor; 140 | const target = getTarget(); 141 | const hook = getDevtoolsGlobalHook(); 142 | const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy; 143 | if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { 144 | hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); 145 | } else { 146 | const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null; 147 | const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; 148 | list.push({ 149 | pluginDescriptor: descriptor, 150 | setupFn, 151 | proxy 152 | }); 153 | if (proxy) 154 | setupFn(proxy.proxiedTarget); 155 | } 156 | } 157 | export { 158 | isPerformanceSupported, 159 | now, 160 | setupDevtoolsPlugin 161 | }; 162 | //# sourceMappingURL=vitepress___@vue_devtools-api.js.map 163 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "sources": ["../../../../node_modules/@vue/devtools-api/lib/esm/env.js", "../../../../node_modules/@vue/devtools-api/lib/esm/const.js", "../../../../node_modules/@vue/devtools-api/lib/esm/time.js", "../../../../node_modules/@vue/devtools-api/lib/esm/proxy.js", "../../../../node_modules/@vue/devtools-api/lib/esm/index.js"], 4 | "sourcesContent": ["export function getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nexport function getTarget() {\n // @ts-ignore\n return (typeof navigator !== 'undefined' && typeof window !== 'undefined')\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n}\nexport const isProxyAvailable = typeof Proxy === 'function';\n", "export const HOOK_SETUP = 'devtools-plugin:setup';\nexport const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';\n", "let supported;\nlet perf;\nexport function isPerformanceSupported() {\n var _a;\n if (supported !== undefined) {\n return supported;\n }\n if (typeof window !== 'undefined' && window.performance) {\n supported = true;\n perf = window.performance;\n }\n else if (typeof global !== 'undefined' && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n }\n else {\n supported = false;\n }\n return supported;\n}\nexport function now() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\n", "import { HOOK_PLUGIN_SETTINGS_SET } from './const.js';\nimport { now } from './time.js';\nexport class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n }\n catch (e) {\n // noop\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n }\n catch (e) {\n // noop\n }\n currentSettings = value;\n },\n now() {\n return now();\n },\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n }\n else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args,\n });\n };\n }\n },\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n }\n else if (prop === 'on') {\n return this.proxiedOn;\n }\n else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => { },\n });\n return this.fallbacks[prop](...args);\n };\n }\n else {\n return (...args) => {\n return new Promise(resolve => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve,\n });\n });\n };\n }\n },\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\n", "import { getTarget, getDevtoolsGlobalHook, isProxyAvailable } from './env.js';\nimport { HOOK_SETUP } from './const.js';\nimport { ApiProxy } from './proxy.js';\nexport * from './api/index.js';\nexport * from './plugin.js';\nexport * from './time.js';\nexport function setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n }\n else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy,\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n"], 5 | "mappings": ";AAAO,SAAS,wBAAwB;AACpC,SAAO,UAAU,EAAE;AACvB;AACO,SAAS,YAAY;AAExB,SAAQ,OAAO,cAAc,eAAe,OAAO,WAAW,cACxD,SACA,OAAO,WAAW,cACd,SACA,CAAC;AACf;AACO,IAAM,mBAAmB,OAAO,UAAU;;;ACX1C,IAAM,aAAa;AACnB,IAAM,2BAA2B;;;ACDxC,IAAI;AACJ,IAAI;AACG,SAAS,yBAAyB;AACrC,MAAI;AACJ,MAAI,cAAc,QAAW;AACzB,WAAO;AAAA,EACX;AACA,MAAI,OAAO,WAAW,eAAe,OAAO,aAAa;AACrD,gBAAY;AACZ,WAAO,OAAO;AAAA,EAClB,WACS,OAAO,WAAW,iBAAiB,KAAK,OAAO,gBAAgB,QAAQ,OAAO,SAAS,SAAS,GAAG,cAAc;AACtH,gBAAY;AACZ,WAAO,OAAO,WAAW;AAAA,EAC7B,OACK;AACD,gBAAY;AAAA,EAChB;AACA,SAAO;AACX;AACO,SAAS,MAAM;AAClB,SAAO,uBAAuB,IAAI,KAAK,IAAI,IAAI,KAAK,IAAI;AAC5D;;;ACpBO,IAAM,WAAN,MAAe;AAAA,EAClB,YAAY,QAAQ,MAAM;AACtB,SAAK,SAAS;AACd,SAAK,cAAc,CAAC;AACpB,SAAK,UAAU,CAAC;AAChB,SAAK,SAAS;AACd,SAAK,OAAO;AACZ,UAAM,kBAAkB,CAAC;AACzB,QAAI,OAAO,UAAU;AACjB,iBAAW,MAAM,OAAO,UAAU;AAC9B,cAAM,OAAO,OAAO,SAAS,EAAE;AAC/B,wBAAgB,EAAE,IAAI,KAAK;AAAA,MAC/B;AAAA,IACJ;AACA,UAAM,sBAAsB,mCAAmC,OAAO,EAAE;AACxE,QAAI,kBAAkB,OAAO,OAAO,CAAC,GAAG,eAAe;AACvD,QAAI;AACA,YAAM,MAAM,aAAa,QAAQ,mBAAmB;AACpD,YAAM,OAAO,KAAK,MAAM,GAAG;AAC3B,aAAO,OAAO,iBAAiB,IAAI;AAAA,IACvC,SACO,GAAG;AAAA,IAEV;AACA,SAAK,YAAY;AAAA,MACb,cAAc;AACV,eAAO;AAAA,MACX;AAAA,MACA,YAAY,OAAO;AACf,YAAI;AACA,uBAAa,QAAQ,qBAAqB,KAAK,UAAU,KAAK,CAAC;AAAA,QACnE,SACO,GAAG;AAAA,QAEV;AACA,0BAAkB;AAAA,MACtB;AAAA,MACA,MAAM;AACF,eAAO,IAAI;AAAA,MACf;AAAA,IACJ;AACA,QAAI,MAAM;AACN,WAAK,GAAG,0BAA0B,CAAC,UAAU,UAAU;AACnD,YAAI,aAAa,KAAK,OAAO,IAAI;AAC7B,eAAK,UAAU,YAAY,KAAK;AAAA,QACpC;AAAA,MACJ,CAAC;AAAA,IACL;AACA,SAAK,YAAY,IAAI,MAAM,CAAC,GAAG;AAAA,MAC3B,KAAK,CAAC,SAAS,SAAS;AACpB,YAAI,KAAK,QAAQ;AACb,iBAAO,KAAK,OAAO,GAAG,IAAI;AAAA,QAC9B,OACK;AACD,iBAAO,IAAI,SAAS;AAChB,iBAAK,QAAQ,KAAK;AAAA,cACd,QAAQ;AAAA,cACR;AAAA,YACJ,CAAC;AAAA,UACL;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ,CAAC;AACD,SAAK,gBAAgB,IAAI,MAAM,CAAC,GAAG;AAAA,MAC/B,KAAK,CAAC,SAAS,SAAS;AACpB,YAAI,KAAK,QAAQ;AACb,iBAAO,KAAK,OAAO,IAAI;AAAA,QAC3B,WACS,SAAS,MAAM;AACpB,iBAAO,KAAK;AAAA,QAChB,WACS,OAAO,KAAK,KAAK,SAAS,EAAE,SAAS,IAAI,GAAG;AACjD,iBAAO,IAAI,SAAS;AAChB,iBAAK,YAAY,KAAK;AAAA,cAClB,QAAQ;AAAA,cACR;AAAA,cACA,SAAS,MAAM;AAAA,cAAE;AAAA,YACrB,CAAC;AACD,mBAAO,KAAK,UAAU,IAAI,EAAE,GAAG,IAAI;AAAA,UACvC;AAAA,QACJ,OACK;AACD,iBAAO,IAAI,SAAS;AAChB,mBAAO,IAAI,QAAQ,aAAW;AAC1B,mBAAK,YAAY,KAAK;AAAA,gBAClB,QAAQ;AAAA,gBACR;AAAA,gBACA;AAAA,cACJ,CAAC;AAAA,YACL,CAAC;AAAA,UACL;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EACA,MAAM,cAAc,QAAQ;AACxB,SAAK,SAAS;AACd,eAAW,QAAQ,KAAK,SAAS;AAC7B,WAAK,OAAO,GAAG,KAAK,MAAM,EAAE,GAAG,KAAK,IAAI;AAAA,IAC5C;AACA,eAAW,QAAQ,KAAK,aAAa;AACjC,WAAK,QAAQ,MAAM,KAAK,OAAO,KAAK,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;AAAA,IAC7D;AAAA,EACJ;AACJ;;;ACpGO,SAAS,oBAAoB,kBAAkB,SAAS;AAC3D,QAAM,aAAa;AACnB,QAAM,SAAS,UAAU;AACzB,QAAM,OAAO,sBAAsB;AACnC,QAAM,cAAc,oBAAoB,WAAW;AACnD,MAAI,SAAS,OAAO,yCAAyC,CAAC,cAAc;AACxE,SAAK,KAAK,YAAY,kBAAkB,OAAO;AAAA,EACnD,OACK;AACD,UAAM,QAAQ,cAAc,IAAI,SAAS,YAAY,IAAI,IAAI;AAC7D,UAAM,OAAO,OAAO,2BAA2B,OAAO,4BAA4B,CAAC;AACnF,SAAK,KAAK;AAAA,MACN,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,IACJ,CAAC;AACD,QAAI;AACA,cAAQ,MAAM,aAAa;AAAA,EACnC;AACJ;", 6 | "names": [] 7 | } 8 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vue.js: -------------------------------------------------------------------------------- 1 | import { 2 | BaseTransition, 3 | BaseTransitionPropsValidators, 4 | Comment, 5 | EffectScope, 6 | Fragment, 7 | KeepAlive, 8 | ReactiveEffect, 9 | Static, 10 | Suspense, 11 | Teleport, 12 | Text, 13 | Transition, 14 | TransitionGroup, 15 | VueElement, 16 | assertNumber, 17 | callWithAsyncErrorHandling, 18 | callWithErrorHandling, 19 | camelize, 20 | capitalize, 21 | cloneVNode, 22 | compatUtils, 23 | compile, 24 | computed, 25 | createApp, 26 | createBaseVNode, 27 | createBlock, 28 | createCommentVNode, 29 | createElementBlock, 30 | createHydrationRenderer, 31 | createPropsRestProxy, 32 | createRenderer, 33 | createSSRApp, 34 | createSlots, 35 | createStaticVNode, 36 | createTextVNode, 37 | createVNode, 38 | customRef, 39 | defineAsyncComponent, 40 | defineComponent, 41 | defineCustomElement, 42 | defineEmits, 43 | defineExpose, 44 | defineModel, 45 | defineOptions, 46 | defineProps, 47 | defineSSRCustomElement, 48 | defineSlots, 49 | devtools, 50 | effect, 51 | effectScope, 52 | getCurrentInstance, 53 | getCurrentScope, 54 | getTransitionRawChildren, 55 | guardReactiveProps, 56 | h, 57 | handleError, 58 | hasInjectionContext, 59 | hydrate, 60 | initCustomFormatter, 61 | initDirectivesForSSR, 62 | inject, 63 | isMemoSame, 64 | isProxy, 65 | isReactive, 66 | isReadonly, 67 | isRef, 68 | isRuntimeOnly, 69 | isShallow, 70 | isVNode, 71 | markRaw, 72 | mergeDefaults, 73 | mergeModels, 74 | mergeProps, 75 | nextTick, 76 | normalizeClass, 77 | normalizeProps, 78 | normalizeStyle, 79 | onActivated, 80 | onBeforeMount, 81 | onBeforeUnmount, 82 | onBeforeUpdate, 83 | onDeactivated, 84 | onErrorCaptured, 85 | onMounted, 86 | onRenderTracked, 87 | onRenderTriggered, 88 | onScopeDispose, 89 | onServerPrefetch, 90 | onUnmounted, 91 | onUpdated, 92 | openBlock, 93 | popScopeId, 94 | provide, 95 | proxyRefs, 96 | pushScopeId, 97 | queuePostFlushCb, 98 | reactive, 99 | readonly, 100 | ref, 101 | registerRuntimeCompiler, 102 | render, 103 | renderList, 104 | renderSlot, 105 | resolveComponent, 106 | resolveDirective, 107 | resolveDynamicComponent, 108 | resolveFilter, 109 | resolveTransitionHooks, 110 | setBlockTracking, 111 | setDevtoolsHook, 112 | setTransitionHooks, 113 | shallowReactive, 114 | shallowReadonly, 115 | shallowRef, 116 | ssrContextKey, 117 | ssrUtils, 118 | stop, 119 | toDisplayString, 120 | toHandlerKey, 121 | toHandlers, 122 | toRaw, 123 | toRef, 124 | toRefs, 125 | toValue, 126 | transformVNodeArgs, 127 | triggerRef, 128 | unref, 129 | useAttrs, 130 | useCssModule, 131 | useCssVars, 132 | useModel, 133 | useSSRContext, 134 | useSlots, 135 | useTransitionState, 136 | vModelCheckbox, 137 | vModelDynamic, 138 | vModelRadio, 139 | vModelSelect, 140 | vModelText, 141 | vShow, 142 | version, 143 | warn, 144 | watch, 145 | watchEffect, 146 | watchPostEffect, 147 | watchSyncEffect, 148 | withAsyncContext, 149 | withCtx, 150 | withDefaults, 151 | withDirectives, 152 | withKeys, 153 | withMemo, 154 | withModifiers, 155 | withScopeId 156 | } from "./chunk-YW53L7UT.js"; 157 | export { 158 | BaseTransition, 159 | BaseTransitionPropsValidators, 160 | Comment, 161 | EffectScope, 162 | Fragment, 163 | KeepAlive, 164 | ReactiveEffect, 165 | Static, 166 | Suspense, 167 | Teleport, 168 | Text, 169 | Transition, 170 | TransitionGroup, 171 | VueElement, 172 | assertNumber, 173 | callWithAsyncErrorHandling, 174 | callWithErrorHandling, 175 | camelize, 176 | capitalize, 177 | cloneVNode, 178 | compatUtils, 179 | compile, 180 | computed, 181 | createApp, 182 | createBlock, 183 | createCommentVNode, 184 | createElementBlock, 185 | createBaseVNode as createElementVNode, 186 | createHydrationRenderer, 187 | createPropsRestProxy, 188 | createRenderer, 189 | createSSRApp, 190 | createSlots, 191 | createStaticVNode, 192 | createTextVNode, 193 | createVNode, 194 | customRef, 195 | defineAsyncComponent, 196 | defineComponent, 197 | defineCustomElement, 198 | defineEmits, 199 | defineExpose, 200 | defineModel, 201 | defineOptions, 202 | defineProps, 203 | defineSSRCustomElement, 204 | defineSlots, 205 | devtools, 206 | effect, 207 | effectScope, 208 | getCurrentInstance, 209 | getCurrentScope, 210 | getTransitionRawChildren, 211 | guardReactiveProps, 212 | h, 213 | handleError, 214 | hasInjectionContext, 215 | hydrate, 216 | initCustomFormatter, 217 | initDirectivesForSSR, 218 | inject, 219 | isMemoSame, 220 | isProxy, 221 | isReactive, 222 | isReadonly, 223 | isRef, 224 | isRuntimeOnly, 225 | isShallow, 226 | isVNode, 227 | markRaw, 228 | mergeDefaults, 229 | mergeModels, 230 | mergeProps, 231 | nextTick, 232 | normalizeClass, 233 | normalizeProps, 234 | normalizeStyle, 235 | onActivated, 236 | onBeforeMount, 237 | onBeforeUnmount, 238 | onBeforeUpdate, 239 | onDeactivated, 240 | onErrorCaptured, 241 | onMounted, 242 | onRenderTracked, 243 | onRenderTriggered, 244 | onScopeDispose, 245 | onServerPrefetch, 246 | onUnmounted, 247 | onUpdated, 248 | openBlock, 249 | popScopeId, 250 | provide, 251 | proxyRefs, 252 | pushScopeId, 253 | queuePostFlushCb, 254 | reactive, 255 | readonly, 256 | ref, 257 | registerRuntimeCompiler, 258 | render, 259 | renderList, 260 | renderSlot, 261 | resolveComponent, 262 | resolveDirective, 263 | resolveDynamicComponent, 264 | resolveFilter, 265 | resolveTransitionHooks, 266 | setBlockTracking, 267 | setDevtoolsHook, 268 | setTransitionHooks, 269 | shallowReactive, 270 | shallowReadonly, 271 | shallowRef, 272 | ssrContextKey, 273 | ssrUtils, 274 | stop, 275 | toDisplayString, 276 | toHandlerKey, 277 | toHandlers, 278 | toRaw, 279 | toRef, 280 | toRefs, 281 | toValue, 282 | transformVNodeArgs, 283 | triggerRef, 284 | unref, 285 | useAttrs, 286 | useCssModule, 287 | useCssVars, 288 | useModel, 289 | useSSRContext, 290 | useSlots, 291 | useTransitionState, 292 | vModelCheckbox, 293 | vModelDynamic, 294 | vModelRadio, 295 | vModelSelect, 296 | vModelText, 297 | vShow, 298 | version, 299 | warn, 300 | watch, 301 | watchEffect, 302 | watchPostEffect, 303 | watchSyncEffect, 304 | withAsyncContext, 305 | withCtx, 306 | withDefaults, 307 | withDirectives, 308 | withKeys, 309 | withMemo, 310 | withModifiers, 311 | withScopeId 312 | }; 313 | //# sourceMappingURL=vue.js.map 314 | -------------------------------------------------------------------------------- /docs/.vitepress/cache/deps/vue.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "sources": [], 4 | "sourcesContent": [], 5 | "mappings": "", 6 | "names": [] 7 | } 8 | -------------------------------------------------------------------------------- /docs/.vitepress/config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitepress"; 2 | 3 | // https://vitepress.dev/reference/site-config 4 | export default defineConfig({ 5 | ignoreDeadLinks: true, 6 | title: "পিএইচপি বেসিক কোর্স", 7 | description: 8 | "একটি বিগেনার ফ্রেন্ডলি পিএইচপি কোর্স | আমরা যারা একদম নতুন তাদের সহজ ভাষায় পিএইচপি শিখানোর চেষ্টা করি ।", 9 | themeConfig: { 10 | // https://vitepress.dev/reference/default-theme-config 11 | nav: [ 12 | { text: "হোম পেজ", link: "/" }, 13 | { text: "ডকুমেন্টেশন", link: "/getting-started/what-is-php" }, 14 | { text: "টিম", link: "/team" }, 15 | ], 16 | 17 | sidebar: [ 18 | { 19 | text: 'শুরু করার উপায়', 20 | collapsed: false, 21 | items: [ 22 | { text: 'PHP এর ইতিহাস', link: '/getting-started/what-is-php' }, 23 | { text: 'PHP ইনস্টলেশন', link: '/getting-started/install-php' }, 24 | { text: 'PHP Tags', link: '/getting-started/php-tags' }, 25 | ] 26 | }, 27 | { 28 | text: 'পিএইচপি মৌলিক', 29 | collapsed: true, 30 | items: [ 31 | { text: 'Variables', link: '/php-fundamentals/variables' }, 32 | { text: 'Type of data in PHP', link: '/php-fundamentals/types-of-data-in-php' }, 33 | { text: 'Constant', link: '/php-fundamentals/constant' }, 34 | { text: 'Comments', link: '/php-fundamentals/comments' }, 35 | ] 36 | }, 37 | { 38 | text: "ক্লাস সমূহ", 39 | items: [ 40 | { text: "দ্বিতীয় ক্লাস", link: "/class-02" }, 41 | { text: "তৃতীয় ক্লাস", link: "/class-03" }, 42 | { text: "চতুর্থ ক্লাস", link: "/class-04" }, 43 | { text: "পঞ্চম ক্লাস", link: "/class-05" }, 44 | { text: "ষষ্ঠ ক্লাস", link: "/class-06" }, 45 | { text: "সপ্তম ক্লাস", link: "/class-07" }, 46 | { text: "অষ্টম ক্লাস", link: "/class-08" }, 47 | { text: "নবম ক্লাস", link: "/class-09" }, 48 | { text: "দশম ক্লাস", link: "/class-10" }, 49 | { text: "একাদশ ক্লাস", link: "/class-11" }, 50 | { text: "দ্বাদশ ক্লাস", link: "/class-12" }, 51 | ], 52 | }, 53 | ], 54 | 55 | socialLinks: [ 56 | { icon: "github", link: "https://github.com/polashmahmud/php" }, 57 | { 58 | icon: "facebook", 59 | link: "https://www.facebook.com/learnwithpolashmahmud", 60 | }, 61 | { icon: "youtube", link: "https://www.youtube.com/polashmahmud4" }, 62 | { icon: "linkedin", link: "https://www.linkedin.com/in/polashmahmud4/" }, 63 | { icon: "discord", link: "https://discord.gg/mktPP7n9xp" }, 64 | { icon: "x", link: "https://twitter.com/polashmahmud4" }, 65 | ], 66 | 67 | footer: { 68 | message: "Released under the MIT License.", 69 | copyright: "Copyright © 2023-present Polash Mahmud", 70 | }, 71 | 72 | lastUpdated: { 73 | text: "Updated at", 74 | formatOptions: { 75 | dateStyle: "full", 76 | timeStyle: "medium", 77 | }, 78 | }, 79 | 80 | search: { 81 | provider: "local", 82 | }, 83 | }, 84 | head: [ 85 | [ 86 | "script", 87 | { 88 | async: "", 89 | src: "https://www.googletagmanager.com/gtag/js?id=G-7RDGBXJVRS", 90 | }, 91 | ], 92 | [ 93 | "script", 94 | {}, 95 | `window.dataLayer = window.dataLayer || []; 96 | function gtag(){dataLayer.push(arguments);} 97 | gtag('js', new Date()); 98 | gtag('config', 'G-7RDGBXJVRS');`, 99 | ], 100 | ], 101 | }); 102 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 404 | PHP Basic Course 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/api-examples.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Runtime API Examples | PHP Basic Course 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
Skip to content

Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:

md
<script setup>
20 | import { useData } from 'vitepress'
21 | 
22 | const { theme, page, frontmatter } = useData()
23 | </script>
24 | 
25 | ## Results
26 | 
27 | ### Theme Data
28 | <pre>{{ theme }}</pre>
29 | 
30 | ### Page Data
31 | <pre>{{ page }}</pre>
32 | 
33 | ### Page Frontmatter
34 | <pre>{{ frontmatter }}</pre>
<script setup>
35 | import { useData } from 'vitepress'
36 | 
37 | const { theme, page, frontmatter } = useData()
38 | </script>
39 | 
40 | ## Results
41 | 
42 | ### Theme Data
43 | <pre>{{ theme }}</pre>
44 | 
45 | ### Page Data
46 | <pre>{{ page }}</pre>
47 | 
48 | ### Page Frontmatter
49 | <pre>{{ frontmatter }}</pre>

Results

Theme Data

{
50 |   "nav": [
51 |     {
52 |       "text": "হোম পেজ",
53 |       "link": "/"
54 |     },
55 |     {
56 |       "text": "ডকুমেন্টেশন",
57 |       "link": "/markdown-examples"
58 |     }
59 |   ],
60 |   "sidebar": [
61 |     {
62 |       "text": "Examples",
63 |       "items": [
64 |         {
65 |           "text": "Markdown Examples",
66 |           "link": "/markdown-examples"
67 |         },
68 |         {
69 |           "text": "Runtime API Examples",
70 |           "link": "/api-examples"
71 |         }
72 |       ]
73 |     }
74 |   ],
75 |   "socialLinks": [
76 |     {
77 |       "icon": "github",
78 |       "link": "https://github.com/vuejs/vitepress"
79 |     }
80 |   ]
81 | }

Page Data

{
82 |   "title": "Runtime API Examples",
83 |   "description": "",
84 |   "frontmatter": {
85 |     "outline": "deep"
86 |   },
87 |   "headers": [],
88 |   "relativePath": "api-examples.md",
89 |   "filePath": "api-examples.md"
90 | }

Page Frontmatter

{
91 |   "outline": "deep"
92 | }

More

Check out the documentation for the full list of runtime APIs.

93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/api-examples.md.d9188294.js: -------------------------------------------------------------------------------- 1 | import{u as o,o as r,c as i,k as a,t as s,l as n,Q as c,a as e}from"./chunks/framework.bfb2b7b2.js";const d=c(`

Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:

md
<script setup>
 2 | import { useData } from 'vitepress'
 3 | 
 4 | const { theme, page, frontmatter } = useData()
 5 | </script>
 6 | 
 7 | ## Results
 8 | 
 9 | ### Theme Data
10 | <pre>{{ theme }}</pre>
11 | 
12 | ### Page Data
13 | <pre>{{ page }}</pre>
14 | 
15 | ### Page Frontmatter
16 | <pre>{{ frontmatter }}</pre>
<script setup>
17 | import { useData } from 'vitepress'
18 | 
19 | const { theme, page, frontmatter } = useData()
20 | </script>
21 | 
22 | ## Results
23 | 
24 | ### Theme Data
25 | <pre>{{ theme }}</pre>
26 | 
27 | ### Page Data
28 | <pre>{{ page }}</pre>
29 | 
30 | ### Page Frontmatter
31 | <pre>{{ frontmatter }}</pre>

Results

Theme Data

`,6),h=a("h3",{id:"page-data",tabindex:"-1"},[e("Page Data "),a("a",{class:"header-anchor",href:"#page-data","aria-label":'Permalink to "Page Data"'},"​")],-1),m=a("h3",{id:"page-frontmatter",tabindex:"-1"},[e("Page Frontmatter "),a("a",{class:"header-anchor",href:"#page-frontmatter","aria-label":'Permalink to "Page Frontmatter"'},"​")],-1),g=a("h2",{id:"more",tabindex:"-1"},[e("More "),a("a",{class:"header-anchor",href:"#more","aria-label":'Permalink to "More"'},"​")],-1),u=a("p",null,[e("Check out the documentation for the "),a("a",{href:"https://vitepress.dev/reference/runtime-api#usedata",target:"_blank",rel:"noreferrer"},"full list of runtime APIs"),e(".")],-1),x=JSON.parse('{"title":"Runtime API Examples","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api-examples.md","filePath":"api-examples.md"}'),f={name:"api-examples.md"},D=Object.assign(f,{setup(_){const{site:E,theme:t,page:l,frontmatter:p}=o();return(b,y)=>(r(),i("div",null,[d,a("pre",null,s(n(t)),1),h,a("pre",null,s(n(l)),1),m,a("pre",null,s(n(p)),1),g,u]))}});export{x as __pageData,D as default}; 32 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/api-examples.md.d9188294.lean.js: -------------------------------------------------------------------------------- 1 | import{u as o,o as r,c as i,k as a,t as s,l as n,Q as c,a as e}from"./chunks/framework.bfb2b7b2.js";const d=c("",6),h=a("h3",{id:"page-data",tabindex:"-1"},[e("Page Data "),a("a",{class:"header-anchor",href:"#page-data","aria-label":'Permalink to "Page Data"'},"​")],-1),m=a("h3",{id:"page-frontmatter",tabindex:"-1"},[e("Page Frontmatter "),a("a",{class:"header-anchor",href:"#page-frontmatter","aria-label":'Permalink to "Page Frontmatter"'},"​")],-1),g=a("h2",{id:"more",tabindex:"-1"},[e("More "),a("a",{class:"header-anchor",href:"#more","aria-label":'Permalink to "More"'},"​")],-1),u=a("p",null,[e("Check out the documentation for the "),a("a",{href:"https://vitepress.dev/reference/runtime-api#usedata",target:"_blank",rel:"noreferrer"},"full list of runtime APIs"),e(".")],-1),x=JSON.parse('{"title":"Runtime API Examples","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api-examples.md","filePath":"api-examples.md"}'),f={name:"api-examples.md"},D=Object.assign(f,{setup(_){const{site:E,theme:t,page:l,frontmatter:p}=o();return(b,y)=>(r(),i("div",null,[d,a("pre",null,s(n(t)),1),h,a("pre",null,s(n(l)),1),m,a("pre",null,s(n(p)),1),g,u]))}});export{x as __pageData,D as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/app.c51039d5.js: -------------------------------------------------------------------------------- 1 | import{a0 as i,s,a1 as c,a2 as l,a3 as d,a4 as f,a5 as m,a6 as h,a7 as A,a8 as y,a9 as g,aa as P,ab as v,d as w,u as C,j as R,y as _,ac as b,ad as D,ae as E}from"./chunks/framework.bfb2b7b2.js";import{t as p}from"./chunks/theme.f054955a.js";const L={extends:p,Layout:()=>i(p.Layout,null,{}),enhanceApp({app:e,router:a,siteData:t}){}};function u(e){if(e.extends){const a=u(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const o=u(L),T=w({name:"VitePressApp",setup(){const{site:e}=C();return R(()=>{_(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),b(),D(),E(),o.setup&&o.setup(),()=>i(o.Layout)}});async function j(){const e=O(),a=x();a.provide(l,e);const t=d(e.route);return a.provide(f,t),a.component("Content",m),a.component("ClientOnly",h),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),o.enhanceApp&&await o.enhanceApp({app:a,router:e,siteData:A}),{app:a,router:e,data:t}}function x(){return y(T)}function O(){let e=s,a;return g(t=>{let n=P(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=v(()=>import(n),[])),s&&(e=!1),r},o.NotFound)}s&&j().then(({app:e,router:a,data:t})=>{a.go().then(()=>{c(a.route,t.site),e.mount("#app")})});export{j as createApp}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/index.md.2db9725f.js: -------------------------------------------------------------------------------- 1 | import{_ as e,o as t,c as a}from"./chunks/framework.bfb2b7b2.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"পিএইচপি বেসিক কোর্স","text":"একটি বিগেনার ফ্রেন্ডলি পিএইচপি কোর্স","tagline":"সৌজন‍্যেঃ Larn with Polash Mahmud","actions":[{"theme":"brand","text":"চলুন শুরু করি","link":"/markdown-examples"}]},"features":[{"title":"আমাদের সম্পর্কে","details":"আমাদের সম্পর্কে জানতে আপনি আমাদের ফেসবুক পেজ ভিজিট করুন। আমরা যারা একদম নতুন তাদের সহজ ভাষায় পিএইচপি শিখানোর চেষ্টা করি। এছাড়াও আমাদের ইউটিউব চ্যানেলে পিএইচপি নিয়ে ভিডিও টিউটোরিয়াল পাবেন।"},{"title":"কোর্স সমূহ","details":"আমাদের কোর্স সমূহ দেখতে আপনি আমাদের ফেসবুক পেজ ভিজিট করুন অথবা আমাদের ইউটিউব চ্যানেলে ভিজিট করুন।"},{"title":"এই সাইট কেন তৈরি করা হয়েছে?","details":"আমরা যখন PHP কোর্সটা শুরু করি তখন আমরা মনে করলাম আমরা যা শিখাচ্ছি কেন না সেগুলো কোথাও নোট করা রাখা যাক। সেই চিন্তা থেকেই আমাদের এই ডকুমেন্টেশনটি তৈরি করা। আমরা যেই কোড গুলো লেখব সেগুলো এই ডকুমেন্টেশনে নোট করে রাখা হবে। যাতে আমরা পরবর্তীতে যখন কোড গুলো দেখব তখন আমরা এই ডকুমেন্টেশন থেকে দেখে নিতে পারি।"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),n={name:"index.md"};function i(o,r,s,d,l,c){return t(),a("div")}const _=e(n,[["render",i]]);export{p as __pageData,_ as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/index.md.2db9725f.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e,o as t,c as a}from"./chunks/framework.bfb2b7b2.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"পিএইচপি বেসিক কোর্স","text":"একটি বিগেনার ফ্রেন্ডলি পিএইচপি কোর্স","tagline":"সৌজন‍্যেঃ Larn with Polash Mahmud","actions":[{"theme":"brand","text":"চলুন শুরু করি","link":"/markdown-examples"}]},"features":[{"title":"আমাদের সম্পর্কে","details":"আমাদের সম্পর্কে জানতে আপনি আমাদের ফেসবুক পেজ ভিজিট করুন। আমরা যারা একদম নতুন তাদের সহজ ভাষায় পিএইচপি শিখানোর চেষ্টা করি। এছাড়াও আমাদের ইউটিউব চ্যানেলে পিএইচপি নিয়ে ভিডিও টিউটোরিয়াল পাবেন।"},{"title":"কোর্স সমূহ","details":"আমাদের কোর্স সমূহ দেখতে আপনি আমাদের ফেসবুক পেজ ভিজিট করুন অথবা আমাদের ইউটিউব চ্যানেলে ভিজিট করুন।"},{"title":"এই সাইট কেন তৈরি করা হয়েছে?","details":"আমরা যখন PHP কোর্সটা শুরু করি তখন আমরা মনে করলাম আমরা যা শিখাচ্ছি কেন না সেগুলো কোথাও নোট করা রাখা যাক। সেই চিন্তা থেকেই আমাদের এই ডকুমেন্টেশনটি তৈরি করা। আমরা যেই কোড গুলো লেখব সেগুলো এই ডকুমেন্টেশনে নোট করে রাখা হবে। যাতে আমরা পরবর্তীতে যখন কোড গুলো দেখব তখন আমরা এই ডকুমেন্টেশন থেকে দেখে নিতে পারি।"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),n={name:"index.md"};function i(o,r,s,d,l,c){return t(),a("div")}const _=e(n,[["render",i]]);export{p as __pageData,_ as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.33bd5a8e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.33bd5a8e.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-italic-cyrillic.ea42a392.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-italic-cyrillic.ea42a392.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-italic-greek-ext.4fbe9427.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-italic-greek-ext.4fbe9427.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-italic-greek.8f4463c4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-italic-greek.8f4463c4.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-italic-latin-ext.bd8920cc.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-italic-latin-ext.bd8920cc.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-italic-latin.bd3b6f56.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-italic-latin.bd3b6f56.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-italic-vietnamese.6ce511fb.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-italic-vietnamese.6ce511fb.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.e75737ce.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.e75737ce.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-roman-cyrillic.5f2c6c8c.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-roman-cyrillic.5f2c6c8c.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-roman-greek-ext.ab0619bc.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-roman-greek-ext.ab0619bc.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-roman-greek.d5a6d92a.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-roman-greek.d5a6d92a.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-roman-latin-ext.0030eebd.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-roman-latin-ext.0030eebd.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-roman-latin.2ed14f66.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-roman-latin.2ed14f66.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/inter-roman-vietnamese.14ce25a6.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polashmahmud/php/bae14d03674900e7b3b2646a43d9d8674814de9f/docs/.vitepress/dist/assets/inter-roman-vietnamese.14ce25a6.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/markdown-examples.md.3f5df2fb.js: -------------------------------------------------------------------------------- 1 | import{_ as s,o as a,c as n,Q as l}from"./chunks/framework.bfb2b7b2.js";const g=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"markdown-examples.md","filePath":"markdown-examples.md"}'),e={name:"markdown-examples.md"},p=l(`

Markdown Extension Examples

This page demonstrates some of the built-in markdown extensions provided by VitePress.

Syntax Highlighting

VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:

Input

\`\`\`js{4}
 2 | export default {
 3 |   data () {
 4 |     return {
 5 |       msg: 'Highlighted!'
 6 |     }
 7 |   }
 8 | }
 9 | \`\`\`
\`\`\`js{4}
10 | export default {
11 |   data () {
12 |     return {
13 |       msg: 'Highlighted!'
14 |     }
15 |   }
16 | }
17 | \`\`\`

Output

js
export default {
18 |   data () {
19 |     return {
20 |       msg: 'Highlighted!'
21 |     }
22 |   }
23 | }
export default {
24 |   data () {
25 |     return {
26 |       msg: 'Highlighted!'
27 |     }
28 |   }
29 | }

Custom Containers

Input

md
::: info
30 | This is an info box.
31 | :::
32 | 
33 | ::: tip
34 | This is a tip.
35 | :::
36 | 
37 | ::: warning
38 | This is a warning.
39 | :::
40 | 
41 | ::: danger
42 | This is a dangerous warning.
43 | :::
44 | 
45 | ::: details
46 | This is a details block.
47 | :::
::: info
48 | This is an info box.
49 | :::
50 | 
51 | ::: tip
52 | This is a tip.
53 | :::
54 | 
55 | ::: warning
56 | This is a warning.
57 | :::
58 | 
59 | ::: danger
60 | This is a dangerous warning.
61 | :::
62 | 
63 | ::: details
64 | This is a details block.
65 | :::

Output

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.

More

Check out the documentation for the full list of markdown extensions.

API Reference

`,20),o=[p];function t(i,c,r,d,h,E){return a(),n("div",null,o)}const u=s(e,[["render",t]]);export{g as __pageData,u as default}; 66 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/markdown-examples.md.3f5df2fb.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as s,o as a,c as n,Q as l}from"./chunks/framework.bfb2b7b2.js";const g=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"markdown-examples.md","filePath":"markdown-examples.md"}'),e={name:"markdown-examples.md"},p=l("",20),o=[p];function t(i,c,r,d,h,E){return a(),n("div",null,o)}const u=s(e,[["render",t]]);export{g as __pageData,u as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/hashmap.json: -------------------------------------------------------------------------------- 1 | {"api-examples.md":"d9188294","markdown-examples.md":"3f5df2fb","index.md":"2db9725f"} 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | PHP Basic Course | PHP Basic Course 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
Skip to content

পিএইচপি বেসিক কোর্স

একটি বিগেনার ফ্রেন্ডলি পিএইচপি কোর্স

সৌজন‍্যেঃ Larn with Polash Mahmud

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/index.js: -------------------------------------------------------------------------------- 1 | // https://vitepress.dev/guide/custom-theme 2 | import { h } from 'vue' 3 | import DefaultTheme from 'vitepress/theme' 4 | import './style.css' 5 | 6 | /** @type {import('vitepress').Theme} */ 7 | export default { 8 | extends: DefaultTheme, 9 | Layout: () => { 10 | return h(DefaultTheme.Layout, null, { 11 | // https://vitepress.dev/guide/extending-default-theme#layout-slots 12 | }) 13 | }, 14 | enhanceApp({ app, router, siteData }) { 15 | // ... 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Customize default theme styling by overriding CSS variables: 3 | * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css 4 | */ 5 | 6 | /** 7 | * Colors 8 | * 9 | * Each colors have exact same color scale system with 3 levels of solid 10 | * colors with different brightness, and 1 soft color. 11 | * 12 | * - `XXX-1`: The most solid color used mainly for colored text. It must 13 | * satisfy the contrast ratio against when used on top of `XXX-soft`. 14 | * 15 | * - `XXX-2`: The color used mainly for hover state of the button. 16 | * 17 | * - `XXX-3`: The color for solid background, such as bg color of the button. 18 | * It must satisfy the contrast ratio with pure white (#ffffff) text on 19 | * top of it. 20 | * 21 | * - `XXX-soft`: The color used for subtle background such as custom container 22 | * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors 23 | * on top of it. 24 | * 25 | * The soft color must be semi transparent alpha channel. This is crucial 26 | * because it allows adding multiple "soft" colors on top of each other 27 | * to create a accent, such as when having inline code block inside 28 | * custom containers. 29 | * 30 | * - `default`: The color used purely for subtle indication without any 31 | * special meanings attched to it such as bg color for menu hover state. 32 | * 33 | * - `brand`: Used for primary brand colors, such as link text, button with 34 | * brand theme, etc. 35 | * 36 | * - `tip`: Used to indicate useful information. The default theme uses the 37 | * brand color for this by default. 38 | * 39 | * - `warning`: Used to indicate warning to the users. Used in custom 40 | * container, badges, etc. 41 | * 42 | * - `danger`: Used to show error, or dangerous message to the users. Used 43 | * in custom container, badges, etc. 44 | * -------------------------------------------------------------------------- */ 45 | 46 | @import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap'); 47 | 48 | 49 | body { 50 | font-family: 'Hind Siliguri', sans-serif; 51 | } 52 | 53 | :root { 54 | --vp-c-default-1: var(--vp-c-gray-1); 55 | --vp-c-default-2: var(--vp-c-gray-2); 56 | --vp-c-default-3: var(--vp-c-gray-3); 57 | --vp-c-default-soft: var(--vp-c-gray-soft); 58 | 59 | --vp-c-brand-1: var(--vp-c-indigo-1); 60 | --vp-c-brand-2: var(--vp-c-indigo-2); 61 | --vp-c-brand-3: var(--vp-c-indigo-3); 62 | --vp-c-brand-soft: var(--vp-c-indigo-soft); 63 | 64 | --vp-c-tip-1: var(--vp-c-brand-1); 65 | --vp-c-tip-2: var(--vp-c-brand-2); 66 | --vp-c-tip-3: var(--vp-c-brand-3); 67 | --vp-c-tip-soft: var(--vp-c-brand-soft); 68 | 69 | --vp-c-warning-1: var(--vp-c-yellow-1); 70 | --vp-c-warning-2: var(--vp-c-yellow-2); 71 | --vp-c-warning-3: var(--vp-c-yellow-3); 72 | --vp-c-warning-soft: var(--vp-c-yellow-soft); 73 | 74 | --vp-c-danger-1: var(--vp-c-red-1); 75 | --vp-c-danger-2: var(--vp-c-red-2); 76 | --vp-c-danger-3: var(--vp-c-red-3); 77 | --vp-c-danger-soft: var(--vp-c-red-soft); 78 | } 79 | 80 | /** 81 | * Component: Button 82 | * -------------------------------------------------------------------------- */ 83 | 84 | :root { 85 | --vp-button-brand-border: transparent; 86 | --vp-button-brand-text: var(--vp-c-white); 87 | --vp-button-brand-bg: var(--vp-c-brand-3); 88 | --vp-button-brand-hover-border: transparent; 89 | --vp-button-brand-hover-text: var(--vp-c-white); 90 | --vp-button-brand-hover-bg: var(--vp-c-brand-2); 91 | --vp-button-brand-active-border: transparent; 92 | --vp-button-brand-active-text: var(--vp-c-white); 93 | --vp-button-brand-active-bg: var(--vp-c-brand-1); 94 | } 95 | 96 | /** 97 | * Component: Home 98 | * -------------------------------------------------------------------------- */ 99 | 100 | :root { 101 | --vp-home-hero-name-color: transparent; 102 | --vp-home-hero-name-background: -webkit-linear-gradient( 103 | 120deg, 104 | #bd34fe 30%, 105 | #41d1ff 106 | ); 107 | 108 | --vp-home-hero-image-background-image: linear-gradient( 109 | -45deg, 110 | #bd34fe 50%, 111 | #47caff 50% 112 | ); 113 | --vp-home-hero-image-filter: blur(44px); 114 | } 115 | 116 | @media (min-width: 640px) { 117 | :root { 118 | --vp-home-hero-image-filter: blur(56px); 119 | } 120 | } 121 | 122 | @media (min-width: 960px) { 123 | :root { 124 | --vp-home-hero-image-filter: blur(68px); 125 | } 126 | } 127 | 128 | /** 129 | * Component: Custom Block 130 | * -------------------------------------------------------------------------- */ 131 | 132 | :root { 133 | --vp-custom-block-tip-border: transparent; 134 | --vp-custom-block-tip-text: var(--vp-c-text-1); 135 | --vp-custom-block-tip-bg: var(--vp-c-brand-soft); 136 | --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); 137 | } 138 | 139 | /** 140 | * Component: Algolia 141 | * -------------------------------------------------------------------------- */ 142 | 143 | .DocSearch { 144 | --docsearch-primary-color: var(--vp-c-brand-1) !important; 145 | } 146 | 147 | -------------------------------------------------------------------------------- /docs/class-03.md: -------------------------------------------------------------------------------- 1 | # পিএইচপি বেসিক কোর্স 2 | 3 | ## printf() ফাংশন 4 | 5 | পিএইচপিতে আমরা যদি কোন ভ‍্যালু প্রিন্ট করতে চাই তাহলে আমরা একটা ফাংশন ব্যবহার করি। এই ফাংশনের নাম printf()। এই ফাংশনের 6 | কাজ হচ্ছে আমরা যে ভ‍্যালু প্রিন্ট করতে চাই তাকে প্রিন্ট করে দেবে। এই ফাংশনের কাজ করার জন‍্য আমাদের কিছু কিছু কমান্ড 7 | ব্যবহার করতে হবে। এই কমান্ডগুলো হচ্ছে- 8 | 9 | - %s - String 10 | - %d - Integer 11 | - %f - Float (decimal numbers) 12 | - %b - Binary 13 | - %o - Octal 14 | 15 | আরো বিস্তারিত জানতে [php.net](https://www.php.net/manual/en/function.printf) এ গিয়ে সার্চ করে দেখতে পারেন। 16 | 17 | **Example #1 printf(): various examples** 18 | 19 | ```php 20 | $b) { 151 | echo "a is greater than b"; 152 | } 153 | ``` 154 | 155 | আউটপুট: 156 | 157 | ``` 158 | a is greater than b 159 | ``` 160 | 161 | **PHP - The if...else Statement** 162 | 163 | পিএইচপিতে আমরা যদি কোন কিছু চেক করতে চাই তাহলে আমরা if...else স্টেটমেন্ট ব্যবহার করি। এই স্টেটমেন্ট এর কাজ হচ্ছে যদি 164 | কোন কিছু সত্য হয় তাহলে এর ভিতরের কোডগুলো রান করবে। আর যদি সত্য না হয় তাহলে else এর ভিতরের কোডগুলো রান করবে। 165 | 166 | সিনট্যাক্সঃ 167 | 168 | ```php 169 | if (condition) { 170 | code to be executed if condition is true; 171 | } else { 172 | code to be executed if condition is false; 173 | } 174 | ``` 175 | 176 | উদাহরণঃ 177 | 178 | ```php 179 | $b) { 184 | echo "a is greater than b"; 185 | } else { 186 | echo "a is NOT greater than b"; 187 | } 188 | ``` 189 | 190 | আউটপুট: 191 | 192 | ``` 193 | a is NOT greater than b 194 | ``` 195 | 196 | **PHP - The if...elseif...else Statement** 197 | 198 | পিএইচপিতে আমরা যদি কোন কিছু চেক করতে চাই তাহলে আমরা if...elseif...else স্টেটমেন্ট ব্যবহার করি। এই স্টেটমেন্ট এর কাজ 199 | হচ্ছে যদি কোন কিছু সত্য হয় তাহলে এর ভিতরের কোডগুলো রান করবে। আর যদি সত্য না হয় তাহলে elseif এর ভিতরের কোডগুলো রান 200 | করবে। আর যদি সত্য না হয় তাহলে else এর ভিতরের কোডগুলো রান করবে। 201 | 202 | সিনট্যাক্সঃ 203 | 204 | ```php 205 | if (condition) { 206 | code to be executed if condition is true; 207 | } elseif (condition) { 208 | code to be executed if condition is false and elseif condition is true; 209 | } else { 210 | code to be executed if and elseif both condition is false; 211 | } 212 | ``` 213 | 214 | উদাহরণঃ 215 | 216 | ```php 217 | $b) { 222 | echo "a is greater than b"; 223 | } elseif ($a == $b) { 224 | echo "a is equal to b"; 225 | } else { 226 | echo "a is NOT greater than b and a is NOT equal to b"; 227 | } 228 | ``` 229 | 230 | Alternative syntax for control structures এর ব্যবহার করে আমরা এই কোডটি লিখতে পারি এভাবেঃ 231 | 232 | ```php 233 | $b): 238 | echo "a is greater than b"; 239 | elseif ($a == $b): 240 | echo "a is equal to b"; 241 | else: 242 | echo "a is NOT greater than b and a is NOT equal to b"; 243 | endif; 244 | ``` 245 | 246 | আউটপুট: 247 | 248 | ``` 249 | a is NOT greater than b and a is NOT equal to b 250 | ``` 251 | 252 | আরো কিছু উদাহরণঃ 253 | 254 | ```php 255 | 256 | 257 | A is equal to 5 258 | 259 | ``` 260 | 261 | আউটপুট: 262 | 263 | ``` 264 | A is equal to 5 265 | ``` 266 | 267 | ```php 268 | $b) ? "a is greater than b" : "a is NOT greater than b"; 306 | ``` 307 | 308 | আউটপুট: 309 | 310 | ``` 311 | a is NOT greater than b 312 | ``` 313 | 314 | ## PHP switch Statement 315 | 316 | সুইচ স্টেটমেন্ট বিভিন্ন অবস্থার উপর ভিত্তি করে বিভিন্ন কাজকর্ম করতে ব্যবহৃত হয়। 317 | 318 | সিনট্যাক্সঃ 319 | 320 | ```php 321 | switch (n) { 322 | case label1: 323 | code to be executed if n=label1; 324 | break; 325 | case label2: 326 | code to be executed if n=label2; 327 | break; 328 | case label3: 329 | code to be executed if n=label3; 330 | break; 331 | ... 332 | default: 333 | code to be executed if n is different from all labels; 334 | } 335 | ``` 336 | 337 | উদাহরণঃ 338 | 339 | ```php 340 | 0); 472 | ``` 473 | 474 | আউটপুট: 475 | 476 | ``` 477 | 0 478 | ``` 479 | 480 | উদাহরণঃ 481 | 482 | ```php 483 | 0); 499 | ``` 500 | 501 | আউটপুট: 502 | 503 | ``` 504 | i is not big enough 505 | ``` 506 | 507 | ## PHP - The for Loop 508 | 509 | পিএইচপিতে আমরা যদি কোন কিছু বারবার করতে চাই তাহলে আমরা for লুপ ব্যবহার করি। এই লুপ এর কাজ হচ্ছে যতক্ষণ কন্ডিশনটি সত্য 510 | ততক্ষণ লুপ চলবে। 511 | 512 | সিনট্যাক্সঃ 513 | 514 | ```php 515 | for (init counter; test counter; increment counter) { 516 | code to be executed for each iteration; 517 | } 518 | ``` 519 | 520 | উদাহরণঃ 521 | 522 | ```php 523 | $value) { 584 | echo "Key: $key; Value: $value\n"; 585 | } 586 | ``` 587 | 588 | আউটপুট: 589 | 590 | ``` 591 | Key: 0; Value: one 592 | Key: 1; Value: two 593 | Key: 2; Value: three 594 | ``` 595 | 596 | ## break and continue 597 | 598 | পিএইচপিতে আমরা যদি কোন লুপ থেকে বের হতে চাই তাহলে আমরা break ব্যবহার করি। আর যদি কোন লুপ এর কিছু কোড স্কিপ করতে চাই 599 | তাহলে আমরা continue ব্যবহার করি। 600 | 601 | উদাহরণঃ 602 | 603 | ```php 604 | 20 | 21 | 22 | 23 | 24 | Tailwind CSS Form 25 | 26 | 27 |

Hello

28 | 29 | ``` 30 | 31 | উপরোক্ত এইচটিএমএলের ইনিশিয়াল টেমপ্লেট-এর head সেকশনে [tailwind css cdn](https://tailwindcss.com/docs/installation/play-cdn) টা লিংক করে দিবো। 32 | 33 | ```html 34 | 35 | ``` 36 | 37 | আমাদের index.php ফাইলের বর্তমান অবস্থাঃ 38 | 39 | ```html 40 | 41 | 42 | 43 | 44 | 45 | 46 | Tailwind CSS Form 47 | 48 | 49 |

Hello

50 | 51 | 52 | ``` 53 | 54 | এবার আমরা পরবর্তী ধাপ তথা ফর্ম তৈরি করব। 55 | 56 | ## প্রাথমিক এইচটিএমএল ফর্ম{#build-first-html-form} 57 | 58 | আমাদের index.php ফাইলের body সেকশনে একটি এইচটিএমএল ফর্ম তৈরি করা হলো যার ভিতরে Text input, Radio Buttons এবং Multi-checkbox ফিল্ডগুলো থাকবে প্রাথমিক ভাবে বিভিন্ন রকম value প্রদান করার জন্য। 59 | 60 | ```html 61 | 62 | 63 | 64 | 65 | 66 | 67 | Tailwind CSS Form 68 | 69 | 70 |
71 |

Example From

72 | 73 | 74 |
75 | 76 |
77 | 78 | 79 |
80 | 81 | 82 |
83 | 84 |
85 | 89 | 93 |
94 |
95 | 96 | 97 |
98 | 99 |
100 | 104 | 108 | 112 |
113 |
114 |
115 |
116 | 117 | 118 | ``` 119 | 120 | এরপর এইচটিএমএল এর ভিতর আমরা date picker ফিল্ড নিবো । 121 | 122 | ```html 123 | 124 |
125 | 126 | 127 |
128 | ``` 129 | 130 | এখানে date picker ব্যবহারের জন্য আমাদের jquery নির্ভরতা দরকার হবে। এজন্য পূর্বের ন‍্যায় এইচটিএমএলের ইনিশিয়াল টেমপ্লেট-এর head সেকশনে [jquery cdn](https://releases.jquery.com/) টা লিংক করে দিবো। 131 | 132 | ```html 133 | 134 | 135 | ``` 136 | 137 | এরপর head section এ jquery cdn এর নিচে [flatpicker cdn](https://flatpickr.js.org/getting-started/) লিংক করে দিবো। 138 | 139 | ```html 140 | 141 | 142 | ``` 143 | 144 | এখন, সবশেষে body section-এর close tag-এর উপরে datepicker যথাযথ কাজ করার জন্য flatpickr ইনিশিয়ালাইজ করে নিতে javascript Call করতে হবে। 145 | 146 | ```html 147 | //all codes are above as regular 148 | 155 | 156 | 157 | ``` 158 | 159 | Note:: https://flatpickr.js.org/examples/ এই documentation এর মাধ্যম Date Format ব্যবহারের সকল তথ্য জানা যাবে । 160 | 161 | এরপর এইচটিএমএল form section এর ভিতর time picker ফিল্ড নিবো। 162 | 163 | ```html 164 | 165 |
166 | 167 | 168 |
169 | ``` 170 | 171 | এখন, পূর্বের datepicker-এর ন‍্যায় আবার timepicker যথাযথ কাজ করার জন্য flatpickr ইনিশিয়ালাইজ করে নিতে javascript Call করতে হবে। তবে এবার পূর্বের code-এর নিচে বসালেই হবে। 172 | 173 | উদাহরণ: 174 | 175 | ```html 176 | //all codes are above as regular 177 | 190 | 191 | 192 | ``` 193 | 194 | Note:: https://www.php.net/manual/en/datetime.format.php এই documentation-এর মাধ্যমে Time Format-এর কোনটা কিভাবে লিখতে হবে, কি লিখলে আউটপুট কি হবে ইত্যাদি ব্যবহারের সকল তথ্য জানা যাবে। 195 | 196 | এখন, আবার এইচটিএমএল form section-এর ভিতরে Multiple Option সিলেক্ট করার জন্য ****Multi select**** ফিল্ড নিবো। 197 | 198 | ```html 199 | 200 |
201 | 202 | 210 |
211 | ``` 212 | 213 | Note: Multiple select ব্যবহার করার ক্ষেত্রে array চিহ্ন '[ ]' যেমনঃ options[] ব্যবহার করতে হবে। 214 | 215 | এরপর head section-এ [select2 cdn](https://select2.org/getting-started/installation) নিয়ে এসে flatpicker cdn-এর উপর বসাতে হবে। 216 | 217 | ```html 218 | 219 | ``` 220 | 221 | এখন ****Multi select**** active করার জন্য Select2 ইনিশিয়ালাইজ করে নিতে js-এর কিছু code বসাতে হবে। যা পূর্বের script code-এর ভিতরে বসালেই হবে। 222 | 223 | ```html 224 | 225 | 231 | ``` 232 | 233 | এখন আবার এইচটিএমএল [f](https://flatpickr.js.org/getting-started/)orm section এর ভিতর Select Dropdown এবং Submit Button ফর্ম নিবো 234 | 235 | ```html 236 | 237 |
238 | 239 | 244 |
245 | 246 | 247 |
248 | 249 |
250 | ``` 251 | 252 | ## ## Method 253 | 254 | Method এর মধ্যে POST নিবো আর আমরা যেহেতু একই পেজে কোড রান করবো সেজন্য action=”#” লিখবো । 255 | 256 | ```html 257 |
258 | ``` 259 | 260 | ## $_SERVER 261 | 262 | এখন php এর $_SERVER মাধ্যমে দেখবো code রান হচ্ছে কি না ? 263 | 264 | ```php 265 | 271 | ``` 272 | 273 | আউটপুটঃ 274 | 275 | ![input-data-sample-page](/public/class-8-part-1.png "Input Data Sample Page") 276 | 277 | এখন আমরা isset এর মাধ্যমে Text input এর name চেক দিবো 278 | 279 | ```php 280 | $name = ''; 281 | 282 | if($_SERVER['REQUEST_METHOD'] == 'POST'){ 283 | $name = isset($_POST['name']) ? htmlspecialchars($_POST['name']) : ''; 284 | echo $name; 285 | } 286 | ``` 287 | 288 | যদি ফর্মে name tag এর ভীতরে কিছু লিখি তাহলে উপরের উদাহারনের মত সেই নাম টা শো হবে আর কোন কিছু না লিখে submit দিলে কিছু show হবে না । 289 | 290 | এরপর name এর এখানে নিচের javascript line লিখে চেক দিয়ে দেখতে হবে string আকারে গেছে কি না? যদি string আকারে যায় তাহলে মনে করতে হবে Php আকারে declare করে নি। 291 | 292 | ```php 293 | 294 | ``` 295 | 296 | এভাবে আমাদের চেক করে নিতে হবে কোন security issues আছে কি না ? 297 | 298 | 299 | এবার php এর মধ্যে ফরমের special character গুলোর তৈরি করবো । 300 | 301 | ```php 302 | $name = ''; 303 | $gender = ''; 304 | $subscribe = []; 305 | $datepicker = ''; 306 | $timepicker = ''; 307 | $options = []; 308 | $country = ''; 309 | 310 | if($_SERVER['REQUEST_METHOD'] == 'POST'){ 311 | $name = isset($_POST['name']) ? htmlspecialchars($_POST['name']) : ''; 312 | $gender = isset($_POST['gender']) ? htmlspecialchars($_POST['gender']) : ''; 313 | $subscribe = isset($_POST["subscribe"]) ? $_POST["subscribe"] : []; 314 | $datepicker = isset($_POST['datepicker']) ? htmlspecialchars($_POST['datepicker']) : ''; 315 | $timepicker = isset($_POST['timepicker']) ? htmlspecialchars($_POST['timepicker']) : ''; 316 | $options = isset($_POST['options']) ? $_POST['options'] : []; 317 | $country = isset($_POST['country']) ? htmlspecialchars($_POST['country']) : ''; 318 | } 319 | ``` 320 | 321 | special character গুলোকে সুন্দর করে প্রিন্ট করার জন্য লিখবো 322 | 323 | ```php 324 | echo '
'; 325 | echo ''; 334 | echo '
'; 335 | ``` 336 | 337 | আমরা যদি এখন চাই আমরা যে ফর্ম টা submit করবো submit এর যে value গুলা আসে সেগুলা relapse বা রিমুভ হবে না । তার জন্য আমাদের বিভিন্ন ফর্মের মধ্যে ইনপুট section এর মধ্যে value নামে priority নিতে হবে । এই value এর মধ্যে যাই নিবো তাই দেখাবে। 338 | 339 | ```php 340 | 341 |
342 | 343 | 344 |
345 | ``` 346 | 347 | আউটপুটঃ 348 | 349 | ![input-data-sample-page](/public/class-8-part-2.png "Input Data Sample Page") 350 | 351 | এখন আমরা ভালুর মধ্যে php ব্লক নিতে পারি। php ব্লকের মধ্যে name variable টা প্রিন্ট করে দিতে পারি। 352 | 353 | ```php 354 | value="" 355 | ``` 356 | 357 | আবার আমরা php এর shorthand ভালু ও নিতে পারি । 358 | 359 | ```php 360 | value="" 361 | ``` 362 | 363 | এভাবেও করা যায় কিন্তু full কোড লিখেই কোড করা উচিৎ। shorthand অনেক server এ **visible** করা থাকে না। তাই আমাদের reguler কোড ব্যবহার করা উচিৎ। 364 | 365 | এখন আমরা যদি নাম ভালুএ তে কোন নামে লিখে submit করি তাহলে সেই নাম এই শো হবে । 366 | 367 | এখন আমরা gender ফর্মের মধ্যে পিএইচপি ব্লক নিবো 368 | 369 | gender এ male এর জন্য নিচের format টা নিবো 370 | 371 | ```php 372 | 373 | ``` 374 | 375 | আর ফর্মের জন্য নিচের টা নিবো 376 | 377 | ```php 378 | 379 | ``` 380 | 381 | Date picker এবং Time Picker ফর্মের জন্য name ফর্মের একই পিএইচপি ব্লক নিয়ে কাজ করা যাবে। 382 | 383 | ### Date picker 384 | 385 | ```php 386 | value="" 387 | ``` 388 | 389 | ### Time Picker 390 | 391 | ```php 392 | value="" 393 | ``` 394 | 395 | Multiselect ফর্মের জন্য in_array এর মাধ্যমে true / false return করতে হবে 396 | 397 | ```php 398 | 406 | ``` 407 | 408 | Dropdown ফর্মের জন্য কিভাবে php declare করতে হবে নিচে দেখানো হলো । 409 | 410 | ```php 411 | 418 | ``` 419 | 420 | Multi-checkbox ফর্মের জন্য php declare করা হলো । 421 | 422 | ```php 423 | 424 |
425 | 426 |
427 | 431 | 435 | 439 |
440 |
441 | ``` 442 | 443 | আউটপুটঃ 444 | 445 | ![input-data-sample-page](/public/class-8-part-3.png "Input Data Sample Page") 446 | 447 | 448 | [Edit This Page](https://github.com/polashmahmud/php/edit/main/docs/class-08.md) -------------------------------------------------------------------------------- /docs/class-09.md: -------------------------------------------------------------------------------- 1 | # পিএইচপি দিয়ে HTML ফর্ম ডাটার Advance ম্যানিপুলেশন 2 | 3 | পূর্ববর্তী ক্লাসে আমরা পিএইচপি বেসিক কনসেপ্টগুলো সম্পর্কে বিস্তর ধারণা পেয়েছি । আজকের ক্লাসে আমরা Advance কিছু শিখব । এখন থেকে ক্লাস গুলো একটু হার্ড হয়ে যাবে। ক্লাস গুলো করার সাথে সাথে প্রাকটিস করতে হবে। 4 | 5 | আজকে আমরা ফাইল আপলোড নিয়ে আলোচনা করবো।ওলরেডি যতগুলা ফর্ম আছে,ফর্মের যে ফিল্ড গুলা আছে সবগুলোই দেখানো হয়েছে শুধু মাত্র ফাইল আপলোড বাদ দিয়ে। কিভাবে ফাইল আপলোড করবেন তা নিয়ে আলোচনা হবে। 6 | 7 | 1. Single file upload 8 | 2. Multiple file upload 9 | 10 | দুটা নিয়েই আলোচনা হবে। 11 | 12 | ফাইল আপলোড করে আপনও পিএইচপি এর মাধ্যমে কোন একটা ফাইলের মধ্যে আপনি পিএইচপি দিয়ে লিখতে পারেন। ডাটা সংগ্রহ করতে পারেন। আবার পড়তেও পারবেন।যেমন: store করার সময় আমরা mysql, mongodb database ইউস করে থাকি। আপনি চাইলে ফাইলকেও ডাটাবেইজ হিসাবে ইউস করতে পারেন। ফাইলের মধ্যেও কিভাবে রিড করতে হয়,কিভাবে write করতে হয়, কিভাবে ওপেন করবেন, ফাইলের কিছু পারমিশন সেট করতে হয় এসব বিষয় নিয়ে আলোচনা করবো। এর পরে আমরা crud type একটা প্রজেক্ট করবো। ফাইল দিয়ে ডাটা ষ্টোরের মাধ্যমে crud দিয়ে প্রসেস করবো। 13 | 14 | ## Single file upload 15 | 16 | প্রথমে আমরা `index.php` নামে একটি পিএইচপি ফাইল তৈরি করে এর ভিতরে একটি বেসিক HTML স্ট্রাকচার নিব যার ভিতরে একটি head ও body সেকশন থাকবে। 17 | 18 | ```php 19 | 20 | 21 | 22 | 23 | 24 | File Upload 25 | 26 | 27 | 28 | 29 | ``` 30 | 31 | এখন দেখবো যে কি ভাবে ফাইল আপলোড করতে পারি। 32 | 33 | ফাইল আপলোডের জন্য আমাদের form নিতে হবে। form এর মধ্যে method নিবো। post method এ ফাইল আপলোড করবো। এখন form এর মধ্যে input নিয়ে typefile নিবো। আরেকবার input নিয়ে টাইপ সাবমিট, নেম ভ্যালুনিবো। এই input টা বাটন হিসাবে কাজ করবে। 34 | 35 | ```php 36 | 37 | 38 | 39 |
40 | ``` 41 | 42 | এখন যদি [localhost](http://localhost) এ site টি open করি তাহলে file upload এর একটি ফর্ম চলে আসছে । এখন যদি ফাইল আপলোড করি এখন কিন্তু আসবে না কারন আমরা কোন কিছু প্রসেস করি নি। 43 | 44 | #### $_FILES 45 | এখন আমরা pre tag নিবো। pre tag ইউস করা হয় কোড গুলা সুন্দর করে দেখানোর জন্য। pre এর মধ্যে php নিয়ে print_r($_FILES) এটা নিতে হবে। 46 | 47 | ```php 48 |
 49 |   
 50 | 
51 | ``` 52 | 53 | #### enctype="multipart/form-data" 54 | 55 | এখন যদি কোন ফাইল আপলোড করি শুধু array return করবে।কারন যখন ফাইল টা দেখাচ্ছি তখন ফর্ম কে call দিতে হবে। ফর্মে call দেওয়ার জন্য 56 | 57 | enctype="multipart/form-data” দিতে হবে। ফাইল আপলোড হওয়ার জন্য input এ tag name="photo" দিতে হবে। 58 | 59 | ```php 60 |
61 | 62 | 63 |
64 | ``` 65 | 66 | আউটপুট: 67 | 68 | ![input-data-sample-page](/public/class-9-part-1.png 69 | "Input Data Sample Page") 70 | 71 | এখন যদি file upload করি তাহলে array আকারে file name, full path,type,tmp_name,error,size আসবে। 72 | 73 | এখন আমরা array file কে move করে অন্য folder এ নিয়ে যাবো। 74 | 75 | #### move_uploaded_file 76 | 77 | এখন একটি uploads নামে folder create করবো। এখন মুভ করে upload এ নিয়ে যাবো। এর জন্য php এর move_uploaded_file নামে build in fanction নিতে হবে। এখানে বলে দিতে হবে কোন ফাইল মুভ করবো, এটা দুইটা আর্গুমেন্ট নেয় 78 | 79 | প্রথম আর্গুমেন্টে কোন ফাইলটা মুভ করতে চাচ্ছেন $_FILES['photo']['tmp_name'] name এবং path দেখায় দিতে হবে 80 | 81 | আর দ্বিতীয় আর্গুমেন্টে বলে দিতে হবে মুভ করা ফাইলের location দিতে হবে। 82 | 83 | ```php 84 |
 85 |   
 89 | 
90 | ``` 91 | 92 | এখন যদি কোন পিক আপলোড করি তাহলে uploads ফোল্ডারে চলে যাবে। 93 | 94 | এখন আমাদের আরো কিছু বিষয় চেক করতে হবে। 95 | 96 | এখানে চেক করতে হবে আমার আপলোড ফাইলটা jpg বা অন্যান্য ফাইল কি না। 97 | 98 | যখনি কোন ফাইলে পত্র নিয়ে কাজ করতে লাগবে তখন অবশ্যই ফাইল টাইপ ভেলিডেশন বসাতে হবে। 99 | 100 | সব সময় ভেলিডেশন বসাতে হবে। যে টাইপের ফাইলে আপলোড হবে তা বলে দিতে হবে image type হলে শুধু image file upload হবে। অন্য type file upload হবে না। doc type file upload হলে শুধু doc type file আপলোড হবে। 101 | 102 | এখন আমরা if দিয়ে ভেলিডেশন এড করবো । if দিয়ে request চেক করবো । আমাদের আগে দিয়ে চেক করে নিতে হবে file কি type এ allowed আছে । allowed এ type বসিয়ে variable এ declear করতে হবে । if দিয়ে চেক করে in_array() argument নিতে হবে । 103 | 104 | in_array() এর মধ্য দুইটা argument নিতে হবে। 105 | 106 | প্রথম argument allowed এর লিড গুলো নিতে হবে । দ্বিতীয় টা তে সেগুলা পাটাবো যা পাচ্ছি । তাহলেই আমার true false type কিছু পেতে পারি 107 | 108 | ```php 109 | 122 | ``` 123 | 124 | এখন যদি কোনো পিক upload করি তাহলে echo show করবে। 125 | 126 | আউটপুটঃ 127 | 128 | ![input-data-sample-page](/public/class-9-part-2.png "Input Data Sample Page") 129 | 130 | এখন যদি file size চেক করতে চাই। 131 | 132 | ```php 133 | if ($_FILES($_FILES['photo']['size']> 1024*1024)) { 134 | echo 'File Size should be less then 1 MB'; 135 | exit; 136 | } 137 | ``` 138 | 139 | এখন পর্যন্ত single file upload complete হবে। 140 | 141 | 142 | ## Multiple file upload 143 | 144 | এখন আমরা multiple file upload করবো। 145 | 146 | প্রথমে আমরা `index.php` নামে একটি পিএইচপি ফাইল তৈরি করে single file এর মতো form তৈরি করে নিবো । কিন্তু multiple file upload করার সময় নাম টা name একটা array হবে। যেমনঃ name="photo[]" । 147 | 148 | দুইভাবে নেওয়া যায় । 149 | 150 | ```php 151 |
152 | 153 | 154 | 155 | 156 | ``` 157 | 158 | অন্য ভাবে input এর শেষ এ multiple লিখে । 159 | 160 | ```php 161 | 162 | 163 | ``` 164 | 165 | multiple লিখে দেখবো যে file multiple করা যাচ্ছে । 166 | 167 | আউটপুটঃ 168 | 169 | ![input-data-sample-page](/public/class-9-part-3.png "Input Data Sample Page") 170 | 171 | এখন আবার single file এর মতো pre এর মধ্যে php নিয়ে print_r($_FILES) এটা নিতে হবে। 172 | 173 | ```php 174 |
175 |     
176 | 
177 | ``` 178 | 179 | এখন যদি কোন ফাইল আপলোড করি যে কয়টা multiple file upload করবো তা array আকারে দেখাবে। 180 | 181 | আউটপুটঃ 182 | 183 | ![input-data-sample-page](/public/class-9-part-4.png "Input Data Sample Page") 184 | 185 | এখন আমরা array এর মধ্য foreach লুপ নিবো । $key নিতে হবে । লুপ চললে লুপের *ইন্ডেক্স* শুরু হয় ০ থেকে । যতটা *ইন্ডেক্স* থাকবে ততোটা key চলবে। 186 | 187 | এখন *ইন্ডেক্সের নাম আনার জন্য file name নিয়ে* ['photo'] তারপর ['name'] তারপর $key নিতে হবে। এর ফলে সে ০ থেকে শুরু করে পর্যায় ক্রমে লুপ চালাবে এবং সব শেষ সবগুলো file এর name এ প্রিন্ট করবে. 188 | 189 | এরপর size, tmp_name, type পর্যায় ক্রমে *ইন্ডেক্স* নিতে হবে। মাঝে মাঝে var_dump করে লুপ চেক করে দেখতে হবে সব ঠিক আসে কি না। 190 | 191 | ```php 192 | $tmp_name){ 195 | $file_name =$_FILES['photo']['name'][$key]; 196 | $file_size =$_FILES['photo']['size'][$key]; 197 | $file_tmp =$_FILES['photo']['tmp_name'][$key]; 198 | $file_type =$_FILES['photo']['type'][$key]; 199 | var_dump($file_name); 200 | } 201 | } 202 | ?> 203 | ``` 204 | 205 | এখন আমরা আবার if দিয়ে একটা condition বসাবো । 206 | 207 | ```php 208 | $tmp_name){ 211 | $file_name =$_FILES['photo']['name'][$key]; 212 | $file_size =$_FILES['photo']['size'][$key]; 213 | $file_tmp =$_FILES['photo']['tmp_name'][$key]; 214 | $file_type =$_FILES['photo']['type'][$key]; 215 | 216 | if(move_uploaded_file($file_tmp,'uploads/'.$file_name)){ 217 | echo'File Uploaded'; 218 | }else{ 219 | echo'Error uploading file'; 220 | } 221 | } 222 | } 223 | ?> 224 | ``` 225 | 226 | এখন যদি কোনো multiple পিক upload করি 227 | 228 | আউটপুটঃ 229 | 230 | ![input-data-sample-page](/public/class-9-part-5.png "Input Data Sample Page") 231 | 232 | -------------------------------------------------------------------------------- /docs/class-10.md: -------------------------------------------------------------------------------- 1 | # পিএইচপি প্রজেক্টঃ 01 - Build Image Gallery 2 | 3 | পূর্ববর্তী ক্লাসে আমরা _HTML Form_ এর ফাইল টাইপ _input element_ এর মাধ্যমে কিভাবে ইউজার থেকে ফাইল ইনপুট নিয়ে তা নির্ধারিত ডিরেক্টরি বা ফোল্ডারে সেভ করা যায় তার ব্যবহার দেখেছি। আজকের ক্লাসে পূর্ববর্তী ধারণাকে কাজে লাগিয়ে পাশাপাশি নতুন কিছু বিষয় শিখে ফাইল নিয়ে আমরা কি কি করতে পারি তার একটা সম্যক ধারণা পেতে একটি ছোটখাট প্রজেক্ট করব। 4 | 5 | ## প্রজেক্ট বিবরণ 6 | 7 | - **প্রজেক্ট নামঃ** প্রজেক্টটির ধরণ অনুযায়ী আমরা এর নাম _Build Image Gallery_ দিতে পারি। 8 | 9 | - **প্রক্রিয়াঃ** আমাদের একটি ফোল্ডার বা ডিরেক্টরি থাকবে। এই ফোল্ডারটিতে যখনই আমাদের ঠিক করে দেয়া ফাইল টাইপ এবং সাইজ অনুযায়ী কোন ইমেজ বা ছবি যোগ করা হবে তখনই তার আউটপুট ব্রাউজারে একটি ওয়েবপেজের মাধ্যমে আমরা প্রদর্শন করব। এখন ব্রাউজার আমরা নিজে থেকে রিলোড দিতে পারি, অথবা ফোল্ডারে কোন ছবি যোগ হওয়ামাত্র ব্রাউজার নিজে থেকে রিলোড নেবে এমন প্রক্রিয়াও করতে পারি। আমরা প্রজেক্টটি এমনভাবে করব যাতে ফোল্ডারে ইতিমধ্যে এক বা একাধিক ছবি থেকে থাকলে আমরা সেগুলো ব্রাউজারে প্রদর্শন করব। 10 | 11 | - **করণীয়ঃ** শিক্ষার্থীদের করণীয় থাকবে, একজন ইউজারকে ছবি আপলোডের সুযোগ দেয়া এবং আপলোড সফলভাবে সম্পন্ন হলে সেই ডিরেক্টরিতে রাখা এবং ব্রাউজারে প্রদর্শন করা। মোটকথা, আমরা একটি _Image gallary type_ ওয়েবসাইট বানাবো। 12 | 13 | ## প্রজেক্ট ফাইনাল লুক 14 | 15 | আমাদের প্রজেক্ট দেখতে ফাইনালি নিন্মোক্ত ধরণের হবেঃ– 16 | 17 | ![Image Gallery First Look](/public/image-gallery-first-look.png "Image Gallery First Look") 18 | 19 | সাইটের ইউআই আমরা [tailwindcss](https://tailwindcss.com/docs/installation) এর মাধ্যমে করেছি। শিক্ষার্থীরা নিজ পছন্দমতো করতে পারেন। 20 | 21 | তাহলে চলুন শুরু করি। 22 | 23 | ## প্রজেক্টের প্রাথমিক সেটআপ 24 | 25 | প্রথমেই আমরা একটি empty ফোল্ডার তৈরি করব `gallery` নামে। এই ফোল্ডারে আমরা আমাদের যাবতীয় ফাইল এবং ডিরেক্টরিগুলো রাখব। এই ডিরেক্টরিতে আমরা প্রাথমিক একটা ফাইল তৈরি করব `index.php` নামে। অতঃপর একটি সাব ডিরেক্টরি তৈরি করব `images` নামে। এই ডিরেক্টরিই হবে আমাদের এন্ট্রি পয়েন্ট। এই `images` ডিরেক্টরিতে থাকা যাবতীয় ফাইল এবং কন্টেন্ট আমরা পিএইচপির সাহায্যে পড়ার চেষ্টা করব এবং আমাদের প্রয়োজন এবং প্রক্রিয়া অনুযায়ী ব্যবহার করে ফাইনাল প্রজেক্টটা দাঁড় করাব। 26 | 27 | ## Directory Functions 28 | 29 | ### opendir() function 30 | 31 | পিএইচপির মাধ্যমে কোন ডিরেক্টরি পড়তে হলে আমাদেরকে প্রথমেই [`opendir()`](https://www.php.net/manual/en/function.opendir.php) ফাংশনের মাধ্যমে ডিরেক্টরিকে ওপেন করে নিতে হবে। এই ফাংশন ব্যবহার ব্যতীত আমরা ডিরেক্টরিতে থাকা ফাইল বা কন্টেন্টগুলোর এক্সেস পাবনা, ফলতঃ ডিরেক্টরি ওপেন না করে ফাইল পড়তে গেলে _Fatal Error_ পাব। 32 | 33 | এখন আমরা `opendir()` ফাংশন দিয়ে ফাইল ওপেন করে `var_dump()` করে দেখতে পারি _images_ ফোল্ডার ওপেন হচ্ছে কি না। উদাহরণঃ– 34 | 35 | ```php 36 | ফাংশনটি যখন আমরা কল করব তখন আর্গুমেন্ট আকারে একটি ওপেন ডিরেক্টরি পাস করব। ফাংশনে আমরা প্রথমে একটি empty array variable নিব। 116 | > 117 | > অতঃপর লুপ চালিয়ে `readdir()` ফাংশন দিয়ে ওপেন রাখা ডিরেক্টরির ফাইল কন্টেন্টগুলো এক্সেস করব। 118 | > 119 | > অতঃপর প্রতিবার লুপ চালিয়ে পাওয়া আউটপুটগুলো চেক করে সেখান থেকে **Linux** ফোল্ডার স্ট্রাকচারের যে দুটি অতিরিক্ত স্ট্রিং আমরা বাই ডিফল্ট পাচ্ছি তা বাদ দিব। 120 | > 121 | > এই চেকটি সম্পন্ন হওয়ার পর উত্তীর্ণ আউটপুটগুলো আমাদের পূর্বঘোষিত empty array variable এ জমা করব। 122 | > 123 | > ফাইনালি, ফাংশন থেকে সেই array কে রিটার্ন করব। 124 | 125 | এবার এক এক করে লজিকগুলো আমরা প্রয়োগ করব। প্রথমেই `$files = []` নামে একটি empty array variable তৈরি করব। উদাহরণঃ 126 | 127 | ```php 128 | string(16) "images/images.jpg" [1]=> string(18) "images/images-2.jpg" [2]=> string(18) "images/images-3.jpg" [3]=> string(18) "images/images-1.jpg" } 405 | ``` 406 | 407 | ## ওয়েবসাইটে ইমেজ ফাইল প্রদর্শন 408 | 409 | আমরা ফোল্ডারসহ ইমেজ ফাইলগুলো দেখতে পাচ্ছি। এখন images গুলো আমাদের ওয়েবসাইটে show করাবো। তারজন্য `index.php` তে একটি পিএইচপি ফাইল তৈরি করে এর ভিতরে একটি বেসিক HTML স্ট্রাকচার নিবো, যার ভিতরে একটি head ও body সেকশন থাকবে এবং $images array এর উপর লুপ চালাবো আর সকল image গুলো এক এক করে print করবো। উদাহরণঃ 410 | 411 | ```php 412 | 420 | 421 | 422 | 423 | 424 | 425 | Document 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | ``` 436 | 437 | আমাদেরকে এতক্ষণ অনুসরণ করে থাকলে এখন আপনার সাইটেও image গুলো show হবে। 438 | 439 | এবার আমরা [Tailwind CSS](https://tailwindcss.com/) ব্যবহার করে একটি সুন্দর লেআউট তৈরি করে ইমেজগুলো প্রদর্শন করব। পাশাপাশি ইউজার কর্তৃক ইমেজ আপলোডের জন্য আমরা একটি HTML ফর্ম নিব। 440 | 441 | ```php 442 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | Image Gallery 458 | 459 | 460 | 461 |
462 |
463 |
464 |

PHP Basic Course
Simple Image Gallery

465 |
466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 |
475 | 476 |
477 | 478 | 479 | 480 | 481 | 482 |
483 |
484 | 485 | 486 | ``` 487 | 488 | আউটপুটঃ 489 | 490 | ![image-gallery-final-look](/public/image-gallery-final-look.png "Image Gallery Final Look") 491 | 492 | ## প্রজেক্ট টাস্ক/এসাইনমেন্ট 493 | 494 | শিক্ষার্থীদের জন্য এই প্রজেক্টের টাস্ক বা এসাইনমেন্ট হল, ইউজারকে ইমেজ ফাইল আপলোডের সুযোগ দেয়া। অতঃপর তার দেয়া আপলোড ফাইলগুলো গ্রহনযোগ্য টাইপের ইমেজ ফাইল কিনা তা চেক করা। পাশাপাশি নির্ধারিত সাইজের কিনা তা যাচাই করা। যদি হয়, তখন ফাইলগুলো আপলোড করে আমরা যে ডিরেক্টরি read করে সাইটে ইমেজ ফাইলগুলো প্রদর্শন করেছি সেই ডিরেক্টরিতে জমা করা। যাতে ফাইল আপলোড সফলভাবে সম্পন্ন হওয়ার সাথে সাথেই আমরা তা সাইটে লাইভ দেখতে পারি। 495 | -------------------------------------------------------------------------------- /docs/getting-started/install-php.md: -------------------------------------------------------------------------------- 1 | # শুরুর পদক্ষেপ 2 | 3 | ## PHP ইনস্টলেশন 4 | 5 | আপনি যদি HTML, CSS এবং JavaScript শিখে **PHP** শিখতে এসে থাকেন প্রথমত আপনাকে একটা বিষয় বুঝতে হবে। **PHP** একটি সার্ভার-সাইড ল্যাংগুয়েজ। যার অর্থ আপনি **PHP** কোড লিখে তার আউটপুট সচরাচর HTML, JavaScript এর মত ব্রাউজারে দেখতে পাবেন না। এজন্য আপনাকে এক্সট্রা কিছু পদক্ষেপ নিতে হবে। যার মধ্যে প্রথম হল, –(সার্ভার-সাইড ল্যাংগুয়েজ রান করার জন্য) – একটি সার্ভার সেটআপ করা। পরবর্তীতে এটা নিয়েই কথা হবে। 6 | 7 | সকল অপারেটিং সিস্টেমেই **PHP** ব‍্যবহার করার সুযোগ আছে। অপারেটিং সিস্টেমভেদে ব্যবহার পদ্ধতিতে যেমন ভিন্নতা রয়েছে, তেমনি রয়েছে সিস্টেম স্পেসিফিক বিভিন্ন প‍্যাকেজ এবং টুল। 8 | 9 | Mac ইউজারদের জন‍্য **PHP** আগে থেকেই ইনস্টল থাকে। সেক্ষেত্রে _Apache configuration file_ **httpd.conf** এর কিছু লাইন আনকমেন্ট করলেই **PHP** কোড লিখে তা এক্সেস করা যাবে। ফাইলটি `/private/etc/apache2/httpd.conf` সাধারণত এই পাথেই পাওয়া যাবে — (যদি পরিবর্তন না করা হয়)। এই ফাইলের নিন্মের লাইন দুটির সামনে থেকে `# (hash sign)` সরিয়ে দিলে আনকমেন্ট হবে। অতঃপর আপনি `php –v` দিয়ে চেক করতে পারেন PHP কাজ করছে কিনা। 10 | 11 | ```apache 12 | # LoadModule php5_module libexec/httpd/libphp5.so 13 | # AddModule mod_php5.c 14 | ``` 15 | 16 | আরও, সহজ পন্থায় নিচের প্যাকেজগুলো থেকে যেকোন একটা দিয়েও ইনস্টল করতে পারেন। আরো প্যাকেজ অপশন দেখার জন্য বা ইনস্টলেশন গাইড জানার জন্য গুগল করুন। 17 | 18 | - [Home Brew](https://brew.sh/) 19 | 20 | 21 | - [Herd](https://herd.laravel.com/) 22 | 23 | 24 | যদি লিনাক্স ইউজার হোন তাহলে আমার পরামর্শ হচ্ছে আপনি কোন প্রকার প‍্যাকেজ ব‍্যবহার না করে সরাসরি টারমিনাল দিয়ে সেটাপ দিন। এ জন‍্য নিচের কমান্ড ২টি ব্যবহার করুন। বিস্তারিত জানতে গুগল করুন। 25 | 26 | ```bash 27 | sudo apt-get update && sudo apt-get upgrade 28 | 29 | sudo apt-get install php 30 | ``` 31 | 32 | Windows ইউজারদের জন‍্য **PHP** সেটাপ করাটা কিছুটা ট্রিকি টাস্ক। কারণ এক্ষেত্রে Mac এর মত যেমনি _Pre-installed_ **PHP** পাওয়া যায় না, তেমনি কমান্ড লাইন ব্যবহার করেও ইনস্টল করার সুযোগ নাই। তবে সহজ দুটি অপশন আছে। এক. ম্যানুয়ালি সেটআপ করা। যেটা ফলো করা কঠিন হলেও আপনার জন্য রেকমেন্ডেড। এক্ষেত্রে মূল কাজটি হল আপনার মেশিনে **_PHP Environment Variable_** সেট করা। কেন এবং কিভাবে জানতে এই [ডক ফাইলটির](https://docs.google.com/document/d/1eLROwtv_BHfqPpa_lMPod__pWLTkin3446SKQl7taM4/edit?usp=sharing) সাহায্য নিন। আপনি গুগল বা ইউটিউবেও গাইডলাইন পেয়ে যাবেন। 33 | 34 | ২য় উপায় হল, **_PHP Installer Tools_** এর সাহায্য নেয়া। সেজন্য অনেক ধরণের টুল এভেলেবল আছে। নিচে জনপ্রিয় কিছু টুলের তালিকা দেয়া হল। 35 | 36 | - [Laragon](https://laragon.org/index.html) 37 | 38 | 39 | - [Wampserver](https://www.wampserver.com/en/) 40 | 41 | 42 | - [XAMPP Server](https://www.apachefriends.org/download.html) 43 | 44 | 45 | - [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) 46 | 47 | 48 | এখানে খেয়াল রাখবেন, ম্যানুয়ালি **PHP** ইনস্টল করলে আপনি আলাদা কিছু সুবিধা পাবেন, যা এই টুলগুলোর ক্ষেত্রে সুলভ নয়। এ বিষয়ে আরো বিস্তারিত জানতে **PHP’র** [**Official Manual**](https://www.php.net/manual/en/install.php) এর সাহায্য নিন। 49 | 50 | ## PHP ইনস্টলেশনের পরবর্তী পদক্ষেপসমূহ 51 | 52 | **PHP** ইনস্টল করা হলে আপনাকে _Terminal'র_ ব‍্যবহার শেখা উচিত। প্রতিটি অপারেটিং সিস্টেমের সাথে _Terminal_ ইন্টিগ্রেটেড বা যুক্ত করা থাকে। সংক্ষেপে _Terminal_ হল আপনার কম্পিউটারের একটি টেক্সট-বেইজড ইন্টারফেস। যা দিয়ে বিভিন্ন ধরণের অপারেশন যেমন: কমান্ড টাইপ করে ফাইল ম্যানিপুলেশন, প্রোগ্রাম এক্সিকিউশন, ডকুমেন্টস ওপেন করাসহ আরো অনেক কিছু করতে পারবেন। বেসিক্যালি এমন অনেক কাজ যা আপনি কিবোর্ড-মাউস চেপে করে থাকেন তা কিছু নির্দিষ্ট কমান্ডের সাহায্যেই করতে পারবেন। 53 | 54 | যারা এডভান্সলি _Terminal_ ব্যবহার করেন তারা এই কমান্ডগুলো জানেন, যারা একদমই নতুন তাদের এগুলো শেখা উচিত। নিচে সচরাচর ব‍্যবহৃত কিছু কমান্ড দেওয়া হল: 55 | 56 | ফোল্ডার তৈরি করা 57 | 58 | ```bash 59 | mkdir foldername 60 | ``` 61 | 62 | তৈরি করা ফোল্ডারে প্রবেশ করা 63 | 64 | ```bash 65 | cd foldername 66 | ``` 67 | 68 | ফোল্ডারের ভিতরে কি কি আছে তা চেক করা 69 | 70 | ```bash 71 | ls 72 | ``` 73 | ```bash 74 | ls -la 75 | ``` 76 | 77 | ফোল্ডার থেকে বাহির হওয়া 78 | 79 | ```bash 80 | cd .. 81 | ``` 82 | 83 | মনে রাখবেন উপরের কমান্ডগুলো _Linux_ বেইজড _Git Bash’র_। কিছু কিছু কমান্ড Mac বা Windows’র সাথে মিলে যেতে পারে। তবে প্রত্যেকটা অপারেটিং সিস্টেমের আলাদা আলাদা কমান্ড লাইন আছে। যেহেতু ডে-টু-ডে লাইফে এমন কমান্ডগুলোর ব্যবহার আপনার দরকার হবে, তাই এই কমান্ডগুলো সকল ডেভলপারের শেখা উচিত। 84 | 85 | ### কোন কমান্ড লাইন শিখবেন? 86 | 87 | সিস্টেম স্পেসিফিক কমান্ড লাইন অনেক ক্ষেত্রেই দরকার পড়ে। তাই সেগুলো শেখা যেতে পারে। তবে আপনার এমন কমান্ড লাইন শেখা উচিত যেটা আসলে কোন সিস্টেমের মধ্যে সীমাবদ্ধ থাকে না। ফলে Mac, Windows বা Linux; সিস্টেম যাইহোক আপনি নির্দ্বিধায় যেকোন জায়গায় সেটা ব্যবহার করতে পারেন। এমন মাল্টি-সিস্টেম-সাপোর্টেড একটি টুলের নাম [**Git Bash**](https://git-scm.com/downloads)। এছাড়াও আরো অনেক টুল আছে। সব বিষয়ে বিস্তারিত জানতে, Git Bash’র আরো কমান্ড পেতে [ডকুমেন্টেশন ম্যানুয়াল](https://git-scm.com/docs) পড়ুন বা গুগল করুন। 88 | 89 | এছাড়াও আপনি Mac ইউজার হলে ডিফল্ট যে Terminal আছে সেটা ব‍্যবহার করতে পারেন অথবা [iterm2](https://iterm2.com/), [warp](https://www.warp.dev/) ব‍্যবহার করতে পারেন। 90 | 91 | Windows’র জন‍্য [Windows Terminal](https://apps.microsoft.com/detail/windows-terminal/9N0DX20HK701?hl=en-us&gl=BD) এবং Linux’র জন‍্য ডিফল্ট যে Terminal আছে তাই যথেষ্ট। চাইলে আপনার পছন্দ অনুযায়ী বিকল্প কিছুও ব্যবহার করতে পারেন। 92 | -------------------------------------------------------------------------------- /docs/getting-started/php-tags.md: -------------------------------------------------------------------------------- 1 | # শুরুর পদক্ষেপ 2 | 3 | ## PHP Tags 4 | 5 | **PHP** কোড লেখার শুরুতে আপনাকে **PHP’র** মৌলিক ট্যাগ সম্পর্কে জানতে হবে। 6 | 7 | **PHP’র** মৌলিক ট্যাগ:– **ওপেনিং ট‍্যাগ হচ্ছে** `` । 8 | 9 | যদি আপনি ফাইলটি শুধুমাত্র **PHP** কোড লেখার জন‍্য তৈরি করেন তখন **PHP’র** ওপেনিং ট্যাগ পুরো ফাইলের প্রথমে একবার লিখলেই চলবে; ক্লোজিং ট্যাগের প্রয়োজন নাই। কারণ, বর্তমানে PHP নিয়ে কাজ করতে গেলে ক্লোজিং ট‍্যাগের দরকার পড়ে না। 10 | 11 | এটিকে শর্ট-হ‍্যান্ড পদ্ধতিতেও লেখা যায়। সেক্ষেত্রে **ওপেনিং ট‍্যাগ** `` । তবে সবসময় শর্ট-হ‍্যান্ড ট‍্যাগ এড়িয়ে চলা/ব‍্যবহার না করা ভালো। 12 | 13 | তবে আপনি যদি **PHP** ফাইলে HTML বা HTML ফাইলে **PHP** লিখতে চান তখন ওপেনিং এবং ক্লোজিং উভয় ট্যাগ অবশ্যই ব‍্যবহার করতে হবে। 14 | 15 | উদাহরণ:— 16 | 17 | ```php 18 | 19 | 20 |

Hi, I'm a paragraph of HTML, inserted between two PHP tags

21 | 22 | 23 | ``` 24 | 25 | যদি পুরো ফাইলটাই হয় **PHP** তাহলে কোন ক্লোজিং ট‍্যাগের দরকার নাই:— 26 | 27 | ```php 28 | 20 | title: আমাদের সম্পর্কে 21 | details: আমাদের সম্পর্কে জানতে আপনি আমাদের ফেসবুক পেজ ভিজিট করুন। আমরা যারা একদম নতুন তাদের সহজ ভাষায় পিএইচপি শিখানোর চেষ্টা করি। এছাড়াও আমাদের ইউটিউব চ্যানেলে পিএইচপি নিয়ে ভিডিও টিউটোরিয়াল পাবেন। 22 | - icon: 23 | title: কোর্স সমূহ 24 | details: আমাদের কোর্স সমূহ দেখতে আপনি আমাদের ফেসবুক পেজ ভিজিট করুন অথবা আমাদের ইউটিউব চ্যানেলে ভিজিট করুন। 25 | - icon: 26 | title: এই সাইট কেন তৈরি করা হয়েছে? 27 | details: আমরা যখন PHP কোর্সটা শুরু করি তখন আমরা মনে করলাম আমরা যা শিখাচ্ছি কেন না সেগুলো কোথাও নোট করে রাখা যাক। সেই চিন্তা থেকেই আমাদের এই ডকুমেন্টেশনটি তৈরি করা। আমরা যেই কোড গুলো লেখব সেগুলো এই ডকুমেন্টেশনে নোট করে রাখা হবে। যাতে আমরা পরবর্তীতে যখন কোড গুলো দেখব তখন আমরা এই ডকুমেন্টেশন থেকে দেখে নিতে পারি। 28 | --- 29 | 30 | 51 | 52 | -------------------------------------------------------------------------------- /docs/php-fundamentals/comments.md: -------------------------------------------------------------------------------- 1 | # পিএইচপি মৌলিক 2 | 3 | ## Comments 4 | 5 | **PHP** ৩ ধরণের কমেন্ট স্টাইল সাপোর্ট করে। 6 | 7 | 1. `C++` ল্যাংগুয়েজের কমেন্ট স্টাইলের মত এক লাইনের কমেন্ট ("one-line" comment)। `//` এটা দিয়ে সিংগেল লাইন কমেন্ট করা হয়। যেমন:- 8 | >```php 9 | > echo 'This is a test'; // This is a one-line c++ style comment 11 | >``` 12 | > 13 | > এই *"one-line" comment* স্টাইল দিয়ে একটি লাইনের শেষ পর্যন্ত অথবা *current block of PHP code* এর শেষ পর্যন্ত (যেটা আগে আসে) কমেন্ট করা যায়। তাই `// ... ?>` বা `# ... ?>` এমন *PHP code block* এর পর যদি কোন **HTML** কোড থাকে সেটা আউটপুটে প্রিন্ট হবে। `?>` এটি **PHP** কোডের শেষ বোঝায়, তাই এর পর থেকে **HTML** কোড শুরু হয়ে যায়। `//` বা `#` এই ২টি এই নিয়মের পরিবর্তন ঘটাতে পারেনা। 14 | > 15 | >> ```HTML 16 | >>

This is an example

17 | >>

The header above will say 'This is an example'.

18 | >>``` 19 | 20 | 2. `C` ল্যাংগুয়েজের কমেন্ট স্টাইলের মত মাল্টিপল লাইন কমেন্ট। এর জন্য ব্যবহৃত হয় `/* */`। 21 | >```php 22 | >/* This is a multi line comment 24 | > yet another line of comment */ 25 | > echo 'This is yet another test'; 26 | > 27 | >/* More complex example, with variables. */ 28 | >``` 29 | > 30 | > এই কমেন্ট স্টাইলটি একটার ভেতরে আরেকটা দিয়ে *nest* করা যাবেনা। কারণ প্রথম `*/` এই চিহ্নটি দেয়ার সাথে সাথেই মাল্টিপল লাইন কমেন্ট শেষ বলে ধরে নেয়া হবে। এরপরে যতগুলো আসবে সব এরর থ্রো করবে। 31 | > 32 | >> ```php 33 | >> > /* 35 | >> echo 'This is a test'; /* This comment will cause a problem */ 36 | >> */ 37 | >>``` 38 | 39 | 3. `Unix shell-style` (Perl style) এর comment। `#` হ্যাশ সাইন দিয়ে করতে হয়। এটিও সিংগেল লাইন কমেন্ট বা *"one-line" comment* এর মত কাজ করে। 40 | > 41 | >```php 42 | >echo 'One Final Test'; # This is a one-line shell-style comment 44 | >``` 45 | 46 | 47 | [Edit This Page](https://github.com/polashmahmud/php/edit/main/docs/class-01.md) -------------------------------------------------------------------------------- /docs/php-fundamentals/constant.md: -------------------------------------------------------------------------------- 1 | # পিএইচপি মৌলিক 2 | 3 | ## Constant 4 | 5 | [*constant*](https://www.php.net/manual/en/language.constants.php) হল একটি *identifier* বা নাম, যার অধীনে কোন একটি ভ্যালু স্টোর করা যায়। *Variables* এর মতই। পার্থক্য হল, *constant* ভ্যালু কখনো পরিবর্তন করা যায় না। *Variables* এর মতই *constant* এর নামও *case-sensitive*। নামকরণের *convention* অনুযায়ী *constant* এর নাম সবসময় *uppercase* লেটারে হবে। 6 | > 7 | > PHP 8.0.0-র আগে [define()](https://www.php.net/manual/en/function.define.php) ফাংশন ব্যবহার করে কোন *constant* ডিফাইন করা হলে তার *case-sensitive* হওয়ার প্রয়োজন ছিলনা। 8 | 9 | *constant*-এর নাম নির্ধারণে ঐ [সমস্ত রুল](#variable-naming-rules) ফলো করতে হবে যা *Variables* বা **PHP** এর অন্যান্য *label* এর ক্ষেত্রে অনুসরণ করতে হয়। 10 | 11 | ##### Valid and invalid constant names এর উদাহরণ:– {#valid-invalid-constant-names} 12 | 13 | ```php 14 | *constant* এর *scope* হল *global*। তাই স্ক্রিপ্টের যেকোন জায়গা থেকে তাকে এক্সেস করা যাবে, *scope* যাইহোক না কেন। *scope* সম্পর্কে আরো জানতে দেখুন [*variable scope*](https://www.php.net/manual/en/language.variables.scope.php) 31 | 32 | ### Constant Syntax 33 | 34 | *constant* লেখার ২টি *Syntax* আছে। 35 | 36 | 1. `define()` ফাংশন ব্যবহার করে 37 | 38 | > ##### Defining Constants Example:- 39 | > ```php 40 | >define("CONSTANT", "Hello world."); 42 | >echo CONSTANT; // outputs "Hello world." 43 | > 44 | >// Constant arrays 45 | >define('ANIMALS', array( 46 | > 'dog', 47 | > 'cat', 48 | > 'bird' 49 | >)); 50 | >echo ANIMALS[1]; // outputs "cat" 51 | >``` 52 | 53 | 2. `const` *keyword* ব্যবহার করে 54 | 55 | > ```php 56 | > const DB_HOST = 'localhost'; 58 | > ``` 59 | 60 | এই ২টি *Syntax* এর ভেতর ব্যবহারগত পার্থক্যও আছে। 61 | 62 | - `define()` ফাংশন ব্যবহার করে *constant* ডিফাইন করলে ভ্যালু হিসেবে আপনি যেকোন ধরণের ডাটা সেট করতে পারেন। *scalar expressions* (bool, int, float and string) ডাটা থেকে নিয়ে শুরু করে ***variable, constants, mathematical operations, function call, result of an expression*** যা বলুন না কেন কোন সীমাবদ্ধতা ছাড়াই আপনি ব্যবহার করতে পারবেন। যেমন:- 63 | > 64 | > ```php 65 | > define('PI', 3.14); 67 | > define('TODAY', date('Y-m-d')); 68 | > ``` 69 | 70 | - `const` *keyword* ব্যবহার করে *constant* ডিফাইন করলে শুধুমাত্র *scalar expressions* এবং *scalar expressions* বহন করে এমন *array*-কে ভ্যালু হিসেবে সেট করতে পারবেন। অন্যকিছু নয়। *resource* ডাটা টাইপও সেট করতে পারবেন, তবে সমস্যা হওয়ার সম্ভাবনা থাকায় তা এড়িয়ে চলুন। উদাহরণ:- 71 | 72 | >##### Defining Constants using the `const` keyword Example:- 73 | >```php 74 | >// Simple scalar value 76 | >const CONSTANT = 'Hello World'; 77 | > 78 | >echo CONSTANT; 79 | > 80 | >// Scalar expression 81 | >const ANOTHER_CONST = CONSTANT.'; Goodbye World'; 82 | >echo ANOTHER_CONST; 83 | > 84 | >const ANIMALS = array('dog', 'cat', 'bird'); 85 | >echo ANIMALS[1]; // outputs "cat" 86 | >``` 87 | 88 | ### Constant ভ্যালু এক্সেস করবেন কিভাবে? {#constant-accessing} 89 | 90 | *constant* ভ্যালু এক্সেস করতে *constant* নাম বা *identifier* ব্যবহার করুন। *Variables* এর মত *constant* এক্সেস করতে নামের পূর্বে `($)` ডলার সাইন দেয়ার প্রয়োজন নাই। 91 | 92 | [`constant()`](https://www.php.net/manual/en/function.constant.php) ফাংশন দিয়েও *constant* ভ্যালু এক্সেস করতে পারেন যদি *constant* এর নাম *dynamically* নির্ধারণ করা সম্ভব হয়। যেমন:- 93 | > 94 | > ```php 95 | > define('MY_CONSTANT', 'Hello, World!'); 97 | > 98 | >// Get the constant's name dynamically, stored in a variable 99 | >$constantName = 'MY_CONSTANT'; 100 | > 101 | >// Retrieve the value of the constant using constant() 102 | >$constantValue = constant($constantName); 103 | > 104 | >echo $constantValue; // Output: Hello, World! 105 | > ``` 106 | 107 | আর [`get_defined_constants()`](https://www.php.net/manual/en/function.get-defined-constants.php) দিয়ে ডিফাইন করা সকল *constant* এর লিস্ট পাবেন। 108 | 109 | > **নোট:**- *constant* আর গ্লোবাল স্কোপের *Variables* একই *namespace* এর ভেতরে থাকেনা। তাই `true` আর `$TRUE` কখনোই এক নয়। 110 | > 111 | > **PHP 7.2.0** এর আগের কথা। তখন যদি কেই *constant* ডিফাইন না করেই কোডবেসের কোথাও ঐ *constant* কে রেফার করে তার ভ্যালু এক্সেস করার চেষ্টা করত **PHP** তার জন্য ঐ ডাটাকে *(as fallback)* `string`-এ কনভার্ট করে `string` ভ্যালু হিসেবে বিবেচনা করত এবং *E_NOTICE* দিত। 112 | > 113 | >>```php 114 | >> >// Assuming CONSTANT is not defined 116 | >>$value = CONSTANT; 117 | >>``` 118 | > 119 | >**PHP 7.2.0** ও তার পরবর্তী ভার্সনগুলোতে (**PHP 8.0.0 পর্যন্ত**) এই *(fallback)* সিস্টেমটা জনপ্রিয়তা হারায়, ঐ ভার্সনগুলো তখন *E_WARNING* দিত। অবশেষে **PHP 8.0.0** এই সিস্টেমকে একেবারে রহিত করে দেয়। ফলে এখন ফ্যাটাল এরর পাবেন। 120 | > 121 | >>```php 122 | >> >$value = UNDEFINED_CONSTANT; // PHP 8.0.0 onwards: Throws an Error 124 | >>``` 125 | > 126 | > **নোট:**- *constant* এর ভ্যালু সেট করা হয়েছে নাকি *undefined* আছে বুঝতে [`defined()`](https://www.php.net/manual/en/function.defined.php) ফাংশন ব্যবহার করুন। 127 | > 128 | >>```php 129 | >>>if (!defined('MY_CONSTANT')) { 131 | >> define('MY_CONSTANT', 'Some value'); 132 | >>} 133 | >> 134 | >>// Check if the constant is defined 135 | >>if (defined('MY_CONSTANT')) { 136 | >> $value = MY_CONSTANT; 137 | >>} else { 138 | >> // Constant is not defined, handle accordingly 139 | >>} 140 | >>``` 141 | 142 | ### *constant* এবং *Variables* এর ভেতর কি পার্থক্য? {#differences-between-constants-variables} 143 | 144 | - *constant* এর নামের পূর্বে `($)` ডলার সাইন লাগে না। *Variables* এর পূর্বে লাগে। 145 | - *constant* যেমনি যেকোন জায়গা বা স্কোপে ডিফাইন করা যায়, তেমনি যেকোন জায়গা বা স্কোপ থেকে এক্সেসও করা যায়। *Variables* এর বেলায় স্কোপ মেইনটেইন করতে হয়। 146 | - *Variables* এর ভ্যালু বারবার পরিবর্তন করা যায়, *constant* এর ভ্যালু একবার সেট করার পর তা আর পরিবর্তন করা যায় না। 147 | - *Variables* এর ভ্যালু *undefined* হতে পারে, *constant* এর ভ্যালু কখনোই *undefined* হতে পারেনা। 148 | - *constant* শুধুমাত্র *scalar values* বা *scalar value বহনকারী arrays* এর ক্ষেত্রে কাজ করে, *Variables* এর এমন সীমাবদ্ধতা নাই। 149 | 150 | > **নোট:-** `const` *keyword* ব্যবহার করে *constant* ডিফাইন করতে হবে স্ক্রিপ্টের *top-level scope*-এ। কারণ এসকল *constant* ডিফাইন হয় *compile-time*-এ। তাই ***functions, loops, if statements or try/catch blocks*** এর ভেতরে `const` *keyword* দিয়ে *constant* ডিফাইন করা যাবেনা। `define()` ফাংশনের বেলায় এই সীমাবদ্ধতা নাই। -------------------------------------------------------------------------------- /docs/php-fundamentals/variables.md: -------------------------------------------------------------------------------- 1 | # পিএইচপি মৌলিক 2 | 3 | ## Variables 4 | 5 | #### Variables কাকে বলে? 6 | 7 | Variables হচ্ছে কোন তথ‍্য (data) ধারণ করে রাখার একটি মাধ‍্যম। যেকোন application এর তথ্যভাণ্ডারে (memory) অস্থায়ীভাবে (temporarily) কোন তথ‍্য (data) সংরক্ষণ (store) করার জন্য Variables ব্যবহৃত হয়। 8 | 9 | অস্থায়ীভাবে (temporarily) কথার অর্থ হল, আপনি চাইলে এই ডাটাটা যেকোন সময় পরিবর্তন করতে পারবেন। যেহেতু ভ্যারিয়েবলের ডাটা পরিবর্তন করা যায় তাই এর নাম Variables —অর্থাৎ যার ডাটা বা ভ্যালু ভ্যারি (vary) করে বা পরিবর্তন হয়। 10 | 11 | যদি কখনোই ডাটা বা ভ্যালু পরিবর্তন করার প্রয়োজন দেখা না দেয়, তখন Constant ব্যবহৃত হয়। এটা নিয়ে আমরা পরবর্তীতে জানতে পারব। চিন্তা করবেন না। 12 | 13 | ## PHP তে Variables লেখার নিয়ম: {#variable-naming-rules} 14 | 15 | **PHP-তে** ভ‍্যারিয়েবল লিখতে সবার আগে একটা $ (ডলার) সাইন দিতে হয়। একটি ভ‍্যালিড ভ‍্যারিয়েবলের নাম শুরু হয় প্রথমে ডলার সাইন ($) তারপর লেটার/অক্ষর অথবা আন্ডার-স্কোর দিয়ে। এর পর তার সাথে যে কোন অক্ষর, সংখ‍্যা বা আন্ডার-স্কোর থাকতে পারে। কিন্তু কোন সংখ্যা বা বিশেষ চিহ্ন দিয়ে ভ‍্যারিয়েবলের নাম শুরু হতে পারবে না। মনে রাখবেন ভ‍্যারিয়েবলের নাম *case-sensitive*। তাই `$var` এবং `$Var` দুটো ভিন্ন ভ্যারিয়েবল। 16 | ```php 17 | 6 | import { 7 | VPTeamPage, 8 | VPTeamPageTitle, 9 | VPTeamMembers 10 | } from 'vitepress/theme' 11 | 12 | const members = [ 13 | { 14 | avatar: 'https://avatars.githubusercontent.com/u/8996190?v=4', 15 | name: 'পলাশ মাহমুদ', 16 | title: 'প্রধান সম্পাদক', 17 | links: [ 18 | { icon: 'github', link: 'https://github.com/polashmahmud' }, 19 | { icon: 'linkedin', link: 'https://www.linkedin.com/in/polashmahmud4/' }, 20 | { icon: 'facebook', link: 'https://www.facebook.com/polashmahmud4/' }, 21 | { icon: 'x', link: 'https://twitter.com/polashmahmud4' } 22 | ] 23 | }, 24 | { 25 | avatar: 'https://avatars.githubusercontent.com/u/61494470?v=4', 26 | name: 'ওমর ফারুক', 27 | title: 'সম্পাদক', 28 | links: [ 29 | { icon: 'github', link: 'https://github.com/Umar-Faruk96' }, 30 | { icon: 'linkedin', link: 'https://linkedin.com/in/omorfaruksheikhraihan' }, 31 | { icon: 'x', link: 'https://twitter.com/RashedOmor' }, 32 | ] 33 | }, 34 | 35 | { 36 | avatar: 'https://avatars.githubusercontent.com/u/95936171?v=4', 37 | name: 'কাজী মোঃ ফয়সাল ', 38 | title: 'স্বেচ্ছাসেবক', 39 | links: [ 40 | { icon: 'github', link: 'https://github.com/kmfoysal06' }, 41 | { icon: 'linkedin', link: 'https://linkedin.com/in/kmfoysal06' }, 42 | { icon: 'facebook', link: 'https://www.facebook.com/kazimd.foysal.01' }, 43 | { icon: 'x', link: 'https://twitter.com/kmfoysal06' } 44 | ] 45 | }, 46 | 47 | { 48 | avatar: 'https://avatars.githubusercontent.com/u/30306452?s=400&v=4', 49 | name: 'রাসেল হোসাইন ', 50 | title: 'সহকারী সম্পাদক', 51 | links: [ 52 | { icon: 'github', link: 'https://github.com/Rasel2f' }, 53 | ] 54 | }, 55 | 56 | { 57 | avatar: 'https://avatars.githubusercontent.com/u/87535510?s=96&v=4', 58 | name: 'তানভীর আব্দুল্লাহ তোহা', 59 | title: 'স্বেচ্ছাসেবক', 60 | links: [ 61 | { icon: 'github', link: 'https://github.com/TohaTanvir' }, 62 | { icon: 'linkedin', link: 'https://www.linkedin.com/in/tohatanvir/' }, 63 | { icon: 'facebook', link: 'https://www.facebook.com/tohatanvir' }, 64 | ] 65 | }, 66 | 67 | { 68 | avatar: 'https://avatars.githubusercontent.com/u/67571769?v=4', 69 | name: 'কাওছার আলম ইভেন', 70 | title: 'সহকারী সম্পাদক', 71 | links: [ 72 | { icon: 'github', link: 'https://github.com/KawsarAlamEven' }, 73 | { icon: 'linkedin', link: 'https://www.linkedin.com/in/kawsaralameven/' }, 74 | { icon: 'facebook', link: 'https://www.facebook.com/kawsaralameeven/' }, 75 | { icon: 'x', link: 'https://twitter.com/KawsarAlam_Even' } 76 | ] 77 | }, 78 | 79 | { 80 | avatar: 'https://avatars.githubusercontent.com/u/43921998?v=4', 81 | name: 'মোঃ রোকনুজ্জামান', 82 | title: 'সহকারী সম্পাদক', 83 | links: [ 84 | { icon: 'github', link: 'https://github.com/iamrokon' }, 85 | { icon: 'linkedin', link: 'https://www.linkedin.com/in/md-rokonuzzaman-pk-b8788b135/' }, 86 | { icon: 'x', link: 'https://twitter.com/mdrokoncse' }, 87 | ] 88 | }, 89 | ] 90 | 91 | 92 | 93 | 94 | 97 | 100 | 101 | 104 | 105 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "vitepress": "^1.0.0-rc.24" 4 | }, 5 | "scripts": { 6 | "docs:dev": "vitepress dev docs", 7 | "docs:build": "vitepress build docs", 8 | "docs:preview": "vitepress preview docs" 9 | } 10 | } --------------------------------------------------------------------------------