??
???? ??? ? ?? ???? ?? ????? ???? ???? ? ?? ???? ?? ?????. ??? ????? ??? ?? 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)

??? ??











ToversionAphp ??, forclarityandeasofrouting, ac

TOSECURELYHANDLEAUSTENCENDACTIONANDACTERIZINGINPHP, FORCUCTSESTEPS : 1. ALWAYSHASHPASSWORTHPASSWORD_HASH () ? VERVERIFYUSINGPANSWORD_VERIFY (), usePREPAREDSTATEMENTSTOPREVENTSQLINGERGED, andSTOREUSERSESSEATAIN $ _SESSIONSAFTERLOGIN.2.impleplempletrole ?? ACCESSC

ProceduralAndObject-OrientedProgramming (OOP) InphpDiffersiMINTIFINTIONTERINGLISTURE, ??? ? ? DATAHANDLING

phpdoesnothaveAbuilt-inweakMapButofferSweakReference.1.WeakReenceAllowsholdingReferences withoutpreventinggarbageCollection.2.ItusteForCaching, Eventlisteners, andMetAdataWithoutAftingObjectLifeCycles.3.youcoucococococococcinccing

PHP?? ?? ???? ???? ????? ??? ?? ??? ???? ?? ??? ??? ??? ???? ????. 1. finfo_file ()? ???? ?? ?? ??? ???? ???/jpeg? ?? ?? ?? ? ?????. 2. uniqid ()? ???? ??? ?? ??? ???? ? Web ?? ????? ??????. 3. php.ini ? html ??? ?? ?? ??? ???? ???? ??? 0755? ?????. 4. Clamav? ???? ???? ???? ??? ??????. ??? ??? ?? ???? ????? ???? ?? ??? ????? ???? ??? ? ??? ?????.

PHP?? ==? ==? ?? ???? ?? ??? ??????. == ?? ??? ?? ?? ?????. ?? ??, 5 == "5"? true? ????, ?? ??? ???? ?? ?? ??? ????? ????? (? : 5 === "5"? false? ?????. ?? ?????? ===? ? ???? ?? ?????? == ?? ??? ??? ???? ?????.

?, PHP? ?? ?? ?? ?????? ?? MongoDB ? Redis? ?? NOSQL ??????? ?? ??? ? ????. ?? MongoDBPHP ???? (PECL ?? Composer? ?? ??)? ???? ????? ????? ??? ?????? ? ???? ????? ??, ??, ?? ? ?? ??? ?????. ??, Predis ????? ?? Phpredis ??? ???? Redis? ???? ?? ? ?? ? ??? ???? ??? ????? Phpredis? ???? ?? Predis? ?? ??? ?????. ? ? ?? ??? ???? ? ????? ????.

PHP?? ?? ??? ??? ???? ??? ??? ????. 1. ?? ??? ?? ? ?? ??? ??? ???? ???? ??? ? ????. ??? ??? ???? ????? ????? ???? ????. 2. ?? ?? ?? - ??, ??? ???? ?? ??? ?????. 3. ?? ???? ??? ??? ???? ??? ??? ?????. 4. Division? / ??? ???? 0?? ??? ?? ????? ??? ?? ??? ?? ? ? ????. 5. ???? ??? ???? ?? ?? ? ?? ??? ???? ? ??? ? ???, ??? ?? ? ? ??? ??? ???? ?????. ? ???? ???? ???? ??? ??? ??? ???? ?? ??? ? ??????? ????.
