??
???? ??? ? ?? ???? ?? ????? ???? ???? ? ?? ???? ?? ?????. ??? ????? ??? ?? JavaScript ??? React? ??? ????? ?? React? ? ??? ?????. ??? PHP? ??? ??? ?????? ??? ??? ?????. ? ??????? PHP ???? React ?????? ??? ?? ???? ??? ??? ??? ???? ??? ?????.
PHP? React? ?? ?? ?? ????
PHP??
PHP?? ??? Hypertext Preprocessor? ?????. ? ??? ???? ?? ? ???? ?????. HTML ??? ?? ??? ? ????. HTML ??? PHP ???? ??? ? ????.
PHP? ??
PHP? ??? ??? ????
?? ? ??? ???:
- PHP? ???? ??? ?? ??? ? ?? ??? ???? ?????. ??? ???? ??? ???? ? ?????? ??? ??? ???? ? ??? ???.
???? ?? ? ???? ??:
- PHP?? ?? ???? ????? ????. ?? ???? ??, ??? ???? ? ??? ??? ???? ?????. ???? ??? ?? ??? ??? ??, ????? ? ???? ??????? ?????.
?? ??:
- PHP? ??? ??????(?: MySQL, PostgreSQL, SQLite), ? ??(?: Apache ? Nginx) ? ?? ???? ???? ?????. ??? ? ??? ?? ??? ??? ?????.
?? ??:
- PHP? ??? ???? ??? ? ????. ?? ?? ??? ??? ????? ?? ?? ??? ?????.
?? ??? ???:
- PHP? Windows, Linux, macOS? ??? ??? ????? ??? ? ????. ??? ???? ?? PHP ??????? ??? ?? ?? ??? ??? ??? ? ????.
PHP? ??
??? PHP? ? ?? ?????.
-
???? ?? ?? ?? ?? ? ???? ??:
- PHP? ?? ???? ?? ? ??? ???? ?? ?? ?? ??? ???? ?????. ?? ?? ???? ?? ?? ?? ?? ??(str_replace ? strpos)? ???? ??(array_filter($array, $callback) ? array_map($callback, $array))? ?? ? ????. ??? ???? ?? ?? ????? ??? ??? ??? ? ????.
-
??? ?? ??:
- PHP?? ?????? ???? ???? ?? ?????? ?? ???? ?? ?? ???? ?????. ?? PHP? ?? ?? ???? ?? ?????? ??? ?????? ?? ??? ??? ??? ??? ???? ??? ??? ? ????.
-
?? ??? ??? ??:
- PHP? ?? ??? ? ??? ?????(?? PHP 7 ????) ?? ??? ?? Node.js ?? Go? ?? ?? ??? ?? ??? ?? ? ????. ?? ?? ?? ??? ?? ?? ??? ??? ??????? ?? ??? ? ? ????.
-
?? ???:
- ??? ?? ??? ???? PHP? ?? ?? ?? ???? ??? ?? ??? ???? ??? ??? ??? ? ????. ?? ??, ???? ??? ???? ??? ?? ??? ?? ? ????("123" == 123? true??? "123" === 123? false???). ?? ?? ?? ??? ?????? ?? ??? ? ? ????.
-
??? ?? ??? ?? ??? ??:
- ?? PHP ??????? ????? ??? ?????? ?? ?? ?? ??? ????? ????? ??? ??? ????? ??? ?????. ?? ?? ?? ??? ??? ?? ??? ??? ??? ? ????. ?? ?????? ? ?? ??? ????? ??? ??? ??? ??? ????? ??? ? ? ????.
???? ????
React JS? ??? ????? ??? ?? ????? ????? ??? JavaScript ????????. MVC??? 'V'???. ReactJS? ??????? ? ???? ???? ?? ?? ?? ?? ?? ??? ?? ????????. ?????? ???? ????.
React Js? ??
React J? ??? ??? ????.
-
???? ?? ????:
- React? ???? ??? ??? UI ????? ??? ? ??? ?? ???? ?? ????? ????. ??? ???? ? ???? ?? ??? ???? ?? ??? ??? ?????. ?? ??? ??????? ?? ???? ???? ? ???? ??? ???? ?? ???? ?????.
-
?? ??? ?? ?? DOM:
- React? Virtual DOM(Document Object Model)? ???? ??? ??? ??????. ?????? ??? ???? React? Virtual DOM? ?? ????? ?? ??? ???? ?? DOM? ????? ???????. ?? DOM? ???? ??? ????? ? ??? ???? ????? ????, ?? UI ??? ??? ??? ??????? ?????.
-
??? UI:
- UI ??? ?? React? ??? ?? ??? ??? ? ?? ???? ????? ?? ????. ???? ??? ??? ?? UI? ??? ??? ??? ???? React? ?? ??? ?? ?? UI? ???????. ?? ?? ??? ??? ????? ?? ????? ????? ?? ???? ?????.
-
??? ??? ? ???? ??:
- React? ??? ????? ??? ?????, ?? ? ?? ??? ?? ??? ???? ???? ????. ??? ???? ??? ?? ???? ???? ???, ???? ? ?? ?? ??? ???? ? ????. ?? Facebook? ??? ? ?? ??? ???? ?? ??? React? ?? ??? ???? ????? ?????.
-
JSX? ?? ??? ??:
- React? HTML? JavaScript ??? ??? ? ?? ??? ?? ??? JSX(JavaScript XML)? ?????. JSX? React ?? ??? ??? ??? ????? ??(HTML)? ??(JavaScript)? ????? ???? ??? ? ?? ?? ????. ???? ??? ??? ???? ?? ???? ???? ???? ???? ??? ?????.
React Js? ??
??? React Js? ? ?? ?????.
-
??? ?? ??:
- React? ???? ???? ??? ?? ? ?????? ???? ?? ??? ???? ?? ? ????. JSX, ????, ?? ?? ? ?? DOM? ???? ?? ??? ???? ?? ?? ????? ??? ? ????.
-
???? ???:
- React ????? ????? ??? ??? ??? ??? ??? ??? ????. Create React App? ?? ??? ?? ??? ?????? ????? ???? ?? ???? ??? ? ???? Webpack ? Babel? ?? ?? ??? ?? ?? ??? ??? ?????.
-
???? ???? ??:
- React ???? ?? ?????? ????? ??? ??? ????? ??? ?????. ?? ?? ??, ???? ? ?????? ???? ?? ????? ??? ? ? ????. ??? ?? ?? ??? ??? ?? ? ??? ?????? ?? ?? ??? ??? ??? ?? ????.
-
?? SEO:
- ????? React? ????? ??? ??????? ?????? ?? ?? ???? ?? ???? ????? ? ???? ?? ? ???? SEO ??? ??? ? ????. Next.js? ?? ?????? ?? ?? ? ???(SSR)? ?? ???? ????? ?? ???? ????? ? ??????.
-
?? ??? ???:
- ??? React ??????? ?? ??? ???? ? ????. React? ?? ?? ??? ??? ??????? ????? ????? Redux, MobX ?? Context API? ?? ?? ??? ?? ?? ???? ?????. ??? ???? ? ?? ???? ???? ???? ??? ??? ?????.
?? ? ???????? PHP? React? ??? ??
?? ? ???????? PHP? React? ??? ??? ? ??? ??? ???? ???? ???? ?? ??? ??????? ????. ??? ??? ??? ??? ?? ?????, ??? ? ??? ?????? ?? ? ?? ??? ?? ??? ???????.
React? ?? PHP? ???? ?? ? ?? 5?? ??
??: ??? 5? ????? ??? ??? ? ?? ??? ????!
1. ??? ???
????? ? ??? ??:
??? ??? ??: React? ??? ??? ????? ???? ??, PHP? ?? ? ??? ??? ??? ???? ??? ?? ??? ?????.
-
API ?? ??: GraphQL ?? RESTful ?????? ?? React ?????? ???? ?????? PHP? ??? ??? API? ???? ??? ?? ??? ??? ? ????.
?? ???:
?? ??: ?????? ??? ????? ??? ???? ?? ?? ??? ??? ?? ??? ?? ? ????.
???? ?? ??: UI ??? ???? ???? React? ?? ?? ?? ?? ??? ????? ??? ? ????? ???? ????.
2. ???
? ?? ?? ??:
???? ???: Laravel? ?? PHP ?????? ??? ?? ???? ??? ??? ????? ???? ???? ?? ??? ??? ????? ????? ???????.
????? ???: ???? ??? ???? ???? React? ?? DOM? ???? ?? ??? ??? ???? ??? UI ??? ?????.
??????? ????:
??? ?? ??: PHP? ??????? ????? ???? ??? ???? ????? ??? ? ????. React? ??? ?? ??? ???? ??? ? ??? ?? ???? ?????.
?? ??: ?? ? ??? ???? PHP? ????? ? ?? ??? ???? React ??? ??? ??? ???? ????? ? ?? ???? ???? ??? ? ????.
3. ??
?? ?? ??:
??? ???(SSR): ?? HTML? PHP? ?? ????? ?????? ??? ? React? ?? ??? ? ????. ? ??? ???? ??? ??? ???? ?? ?? ??? ?????.
??? ??? ????: React? ???? ???? ??? ??? ?????? ???? ??? ?? ??? ????? ????? PHP ????? ???? ?????? ??? ? ????.
??? ??????:
???? ?? ??: ???? ? ??? ?? React? ?? ?? ??? ???? UI ?? ??? ? ????? ??? ? ?? ???? ????? ???? ??????.
?? ? ???: PHP? ?? ? ?? ??? ???? ?? ?? ?? ??? ??? ?????? ??? ?? ??? ???? ? ????.
4. ??? ??? ?????
????? ??? UI:
???? ?? ???: React? ???? ?? ???? ?? ?????? ???? ?????? ??? ? ?? ???? ??? ??? ?????? ?? ? ????.
??? ????: React? ?? ??? ??? ??? ????? ????? ??? ? ?? ???? ???? ??? ??? ?????.
??? ??? ??:
-
?? UI ?????: React? ?? UI ????? ? ?????(?: Material-UI ? Ant Design)? ? ????? ?????? ???? ?? ?? ???? ??? ?????? ???? ? ????.
React? ???? ??? ??? ?? ???? ????? ???? ??? ? ??? ??? ?????(UI)? ???? ??? ? ????.
5. SEO ???
?? ?? ??? ??:
?? ? ???(SSR): ?????? ???? ?? PHP? ???? HTML ???? ?? ????? ? ?? ?? ?? ?? ? SEO? ?????.
?? ?? ? ?? ??: PHP ???? ??? ???? React? ?? ??, ?? ? ?? SEO ?? ??? ???? ???? ????? ? ????.
? ?? ??? ??:
?? ??? ??(SSG): React? ? ??? ?? ???? Next.js? ?? ???? ???? ?? ? ?? ???? ???? ?? ???? ?? PHP? ????? ??????? SEO? ??? ? ????. SSR? SSG.
URL ??: React? ???? ??? ???? ???? ?? ??? ?? ???? ??? ? ??? ??, PHP? ???? SEO ???? URL ??? ??? ? ????.
???? PHP? React? ???? ??? ??? ??? ?? ?? ???? ?? ???? ?? ???? ?? ???? ??? ?? ??? ? ????. ??? ??? ?? ?????? ??? ??? ???? ???? ?? ??? ?? ????? ?? ? ????.
PHP ? React ?? ?? ??
?? React.js? PHP? ??? ??? ???? ?? ????? ????? ???.
?? ??
????? ??? ? ???? React? ???? PHP? ???? ????? ?? ??? ? ??? ????. ?? ??? ??? ????!
- PHP? ?? ?? ??? ??? ?
- React.J? ?? ?????
- npm? ?? Node.js? ???? ???? ??? ?????.
- ???? Apache ?? Nginx? PHP? ???? ??? ???
React? ??? ??? ???? PHP? ???? ???? ??? ?? ??? ????
React? ?? PHP? ???? ???? ??? ?? ???? ??? ????.
????? ??
1??: ???? ?? ?? ??? ?????.
npx create-react-app my-react-app
??: ? ??? ???? ?? ?? ??? ??? ????? cd? ???? ???! ??? ????? CD? ???? ??? ???? ? ??? ???? ????
cd Documents
???? React ?? ??? ??? ?????.
2??: ???? ??? ?????.
?? ??? ????? ????? ???? ???
cd my-react-app
3??: ?? ?? ??:
npm start
PHP ??? ??
?? React ??????? ????? PHP ???? ??? ?????.
1??: React ? ???? ?? PHP ??? ?? ? ??? ????.
?? ????? ????? ?? ??? ?????
mkdir php_backend
? ??? ???? php_backend?? ??? ?????
2??: php-backend ?? ?? index.php?? ??? ????.
??: ??? ???? ??? ? ????. ? ???? index.php? ????? ??????.
3??: index.php?? PHP ?????? ?? ??? ??? ? ????.
??? ? php-backend/index.php? ??? ?????. PHP ????? ? ??? ??? ????.
<?PHP $serverName="localhost"; $userName="root"; $password=""; $databaseName="react_php"; $conn = mysqli_connect($serverName, $userName, $password, $databaseName); $recText = $_POST['text']; $query = ("INSERT INTO react_php (texts) VALUES('$recText')"); if (mysqli_query($conn, $query)) { echo "Data has been inserted successfully"; }else { echo "Error"; } ?>
?? ???? ? ?? ??? ??? React ??? ???? ?? ????? ??? ?? src/App.js? ?? ??? ???? ?? ??? ???? ????.
import React, { Component } from 'react'; // import logo from './logo.svg'; import axios from 'axios'; //Import Axios import './App.css'; class App extends Component{ state = { text : "" } handleAdd = async e =>{ await this.setState({ text : e.target.value }) } handleSubmit = e =>{ e.preventDefault(); console.log(this.state.text); let formData = new FormData(); formData.append("text", this.state.text); const url = "http://localhost:80/react-backend/" axios.post(url,formData) .then(res=> console.log(res.data)) .catch(err=> console.log(err)) } render(){ return( <div className="App-header"> <input onChange={this.handleAdd} className="form-control" // value={this.state.text} type="text" id='text' placeholder='Enter Some Text!'/> <br/> <button onClick={this.handleSubmit} className="btn btn-success" id='submit'> Save</button> </div> ); }
}
?? ? ????
??: PHP? ????? ?? ?? **Axios**???. ?? ?? ??? ?? ??? ??? ????? ? ? ????!
????? public ??? index.html ??? ????. ?? ???? ?? ?????? ????? CDN? ??????.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
??? ??? ????? ????.
.App { text-align: center; } .App-logo { height: 40vmin; pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .App-logo { animation: App-logo-spin infinite 20s linear; } } .App-header { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white; } .App-link { color: #61dafb; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
? ?? ?? ??? ? ?? ??? ??? ????.
??? ???? ???? ?????????. ???? ???? ??? ???? ?? ???? ??????? ???? ?????.
???? **Freddie**?? ?? ?? ??? ???? ??? ??? ?? ????? ??????. ? ??? ?? ??? ?? ?? ??? ?? ? ? ????.
??? ?? ?? ???????? React? PHP?? ??? ?????.
??
????? PHP? ???? ???? React? ?????? ???? ?? ? ?????? ??? ?? ???? ??? ???? ?????. ??? ?? ??, ? ??? PHP? ?? ? ??? React? ?? ?? ?? ?? ????? ??? ???? ?? ??? ??? ??????? ????. PHP? ?? ? ??, ?????? ?? ?? ? API ??? ????? ???? ?? React? ???? ???? ??? ??? ?????? ??? ??? ??? ?????.
PHP? React? ??? ??? ??? ?? ????? ???? ?? ??? ????? ????? SEO ???? ? ??????? ??????. ? ??? ??? ?? ???? ????? ??? ???? ? ??????? ?? ????? ??? ? ????.
? ????? ?? ????? ????! ?? ???? ??? ???.
?? ??
? ?? Laravel ??? Emmanuel Okolie? ????? ?? ???? 4? ??? ??? ???? ????. ?? ????? ??, ???, ??? ?? ?? ?? ???? ???? ?? ???? ???? ??? ??????.
?? ???? ReactJ, Laravel, PHP, JavaScript ? ?? ??? ?????? ???? ????.
?????? ?? ??? ?? ????? ??? ????? ??? ?? ?? ???? ??? ???? ?? ???? ?????.
??? ????? Emmanuel Okolie? ??? ???? ??? ?? ??? ????. ?? ????, Facebook, Github, LinkedIn, Twitter? ???? ??????.
? ??? ?????? React? ???? PHP? ???? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

????? ??? ????? ????? ??? ??? ???????. ?? ?? ??? ??? ????. 1. ??? 8 ?? ?????. 2. ??? ???, ??? ? ??? ?????. 3. ?? ?? ??? ?? ? ? ????. ?? ??? ????, ??? ???? ?? ? ??/?? ???? ?????, ?? PHP ?? ??? ?????. ???, ?????? ???? ?? ? 123456? ?? ???? ?? ??? ????????. ????? ?? ???? ????? ?? ZXCVBN ?????? ???? ?? ????.

? ?? PHP ??? ???? ?? ? ?? ????? ? ?? ?? ??? ????. 1. ??? ??? ?? ?? ??? ?? Array_Merge ? Array_unique ??? ??????. ?? Array_Merge ($ array1, $ array2)? ?? ? ?? Array_Unique ()? ???? ?? ?? ? ?? ???? ? ??? ?????. 2. ?? ?? ? ? ?? ???? ? ? ?? ????? ???? ??????. $ result = $ array1 $ array2? ? ?? ??? ?? ? ?? ??? ?? ?? ?? ??????. ? ? ?? ??? ? ??? ????? ??? ?? ?

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP?? ??? ???? ? ?? ??? ???? : ?? () ??? ????? ???? ?????? []. 1. ?? () ??? ???? ?? ???? ???? ???? ?????. $ fruits = array ( "Apple", "Banana", "Orange")? ?? ??? ???? ???? $ user = array ( "name"=> "john", "age"=> 25)? ?? ?? ??; 2. [] ??? $ color? ?? PHP5.4 ??? ? ??? ?? ?????.
