PHP?? ?????? ??????? ???? ??
?????? ??????? ???? ???? ???? ???? ?????? ???? ?? ??? ???? ?? ??? ??? ? ??? ??? ??? ?????? ??? ???? ?????. PHP??? ?????? ?????? ??? ???? ??? ? ??? ????? ????? ?????? ??? ???? ?? ? ????? ?? ?? ???? ????. ?????? ??? ??????? ?????? ??? ???? ??? ????? ??? ??? ???? ???? ??? ?????.
? ????? ?? ?? ????? ??, ?? ?? ? ?? ??? ???? PHP?? ?????? ??????? ???? ??? ???????.
1. ?????? ???????? ??????
?????? ??????? ?????? ???? ?? ?? ??(?: ??? ? ? ??, ????, ??)? ??? ???? ??? ?? ??? ??? ???? ???? ?????. ??????? ?? ?? ??? ??? ? ????.
- ?? ?? ??: ??????? ??? ??? ??? ?? ??? ????? ??? ?? ?? ??? ?? ?????? ??? ? ????.
- ??? ???? ???: ??????? ???? ????? ?? ???? ??? ? ???? ?????? ???? ?? ??(??, ????, ????)?? ??? ???? ??????? ? ? ????.
- ?? ?? ????: ??????? ??? ?? ?? ???? ?? ? ?? ?? ???? ???? ??? ? ????.
2. ??????? ??? ??? ??????
- ???: ???? ?? ???? ??? ?????? ???? ????? ?????.
- ???: ??????? ???? ??? ? ???? ???? ? ?? ??? ?????.
- ?? ??: ??????? ???? ?? ??? ?? ?????? ???? ??? ?? ??? ? ????.
- ?? ???: ??????? ?? ?? ??? ??? ??? ??(??, ????, ????)?? ??? ?? ??? ?? ???? ???? ? ????.
3. PHP?? ??????? ???? ??
PHP?? ?????? ??????? ???? ???? ?? ??? ??? ?? ???? ?? ??? ?????? ?????? ???? ????. Phinx ? Doctrine Migrations
? ?? ?? ?? PHP ?????? ???? ?? ???? ??? ??? ????.4. ?????? ??????? Phinx ??
Phinx? ?????? ??????? ???? ??? ? ?? ?? ?? PHP ?????? ?????. MySQL, PostgreSQL, SQLite ?? ?? ?? ?????? ???? ?????.
1??: Composer? ?? Phinx ??
Phinx? ????? Composer? ???? ?? ???? ???? ???.
composer require robmorgan/phinx
2??: ?? ??
Phinx??? ?? ?? ? ?? ?? ??? ???? ?? ?? ??(phinx.php ?? phinx.yml)? ?????. ??? phinx.php? ?? ????:
<?php return [ 'paths' => [ 'migrations' => 'db/migrations', 'seeds' => 'db/seeds' ], 'environments' => [ 'default' => 'development', 'development' => [ 'adapter' => 'mysql', 'host' => 'localhost', 'name' => 'your_database_name', 'user' => 'root', 'pass' => '', 'charset' => 'utf8', ], 'production' => [ 'adapter' => 'mysql', 'host' => 'production_host', 'name' => 'your_production_database', 'user' => 'prod_user', 'pass' => 'prod_password', 'charset' => 'utf8', ] ] ];
? ??? Phinx? ?????? ??????? ???? ? ?? ??(?? ? ????)? ?????.
3??: ?????? ??
??????? ????? ?? Phinx ??? ??? ? ????.
php vendor/bin/phinx create CreateUsersTable
? ??? db/migrations ????? ?????? ??? ?????. ?????? ??? ??? ????.
<?php use Phinx\Migration\AbstractMigration; class CreateUsersTable extends AbstractMigration { public function change() { $table = $this->table('users'); $table->addColumn('name', 'string') ->addColumn('email', 'string') ->create(); } }
? ???????? ??? ?????? ? ?? ?? ?? ??? ???? ?????.
4??: ?????? ??
??????? ???? ?? ??? ???? ??????? ??????? ??? ? ????.
php vendor/bin/phinx migrate
Phinx? ?? ???? ?? ??? ??????? ?????. ?? ??? ??? ?? ????.
php vendor/bin/phinx migrate -e production
5??: ?????? ??
??????? ???? ?? ??(?: ?? ??? ????? ??) Phinx? ?? ??? ?????.
php vendor/bin/phinx rollback
??? ?? ?? ???? ??? ??? ?? ????.
php vendor/bin/phinx rollback -t 20210101000000
? ??? ??????? ??? ???? ?????.
5. ?????? ??????? ?? ?? ?????? ??
Doctrine ??????? ?????? ??????? ?? ? ?? ?? ?? ???, ?? ?? ?????? ?? ??? Doctrine ORM? ???? ????? ?? ?? ?????. Doctrine? ?? ???? ?????? ??? ?? ?? ??? ?????.
1??: Doctrine ?????? ??
composer require doctrine/migrations
2??: ?? ?????? ??
?????? ?? ? ?????? ??? ????? ?? ??(migrations.php)? ???? ???.
migrations.php ?? ?:
<?php use Doctrine\DBAL\DriverManager; use Doctrine\Migrations\Configuration\Configuration; use Doctrine\Migrations\Tools\Console\Command; use Doctrine\Migrations\Tools\Console\ConsoleRunner; // Set up the database connection $conn = DriverManager::getConnection([ 'url' => 'mysql://root:@localhost/your_database_name', ]); // Set up the migrations configuration $config = new Configuration($conn); $config->setMigrationsNamespace('App\Migrations'); $config->setMigrationsDirectory('db/migrations'); // Create the migration tool $console = ConsoleRunner::createApplication($config); $console->run();
3??: ?????? ??
Doctrine CLI? ???? ??????? ??? ? ????.
php vendor/bin/doctrine-migrations generate
??? ?? db/migrations ????? ?????? ??? ?????.
4??: ?????? ??
??????? ????? ??? ?????.
php vendor/bin/doctrine-migrations migrate
? ??? ?? ?? ?? ??????? ??????? ?????.
5??: ?????? ??
??????? ????? ??? ?????.
composer require robmorgan/phinx
??? ?? ??? ?????? ??? ??? ? ????.
6. PHP ?????? ?? ?? ??
- ?? ??: ?? ?????? ??? ?? ??(?: Git)? ?????. ??? ?? ??? ??? ?????? ?? ??? ???? ??? ? ????.
- ?? ?? ??: ???????? ?? ?? ??? ????. ??????? ???? ???? ???? ??? ???? ??? ? ????.
- ???? ?????? ??: ? ??????? ??? ?? ??? ? ??? ???? ???? ?????? ??? ??? ?????(?: AddIndexToUsersTable ?? CreateProductsTable).
- ?????? ???: ???? ??? ????? ????? ???? ?? ?? ?? ?? ?? ???????? ??????? ??????.
- ??????? ???? ????? ??: ???? ???? ??????? ????. ?? ???? ??? ???? ??? ? ??? ? ?????.
7. ??
?????? ?????? ??? ?? PHP ?????? ?? ?????? ???? ?????. Phinx ?? Doctrine Migrations? ?? ?????? ??? ???? ?????? ??? ?? ??? ???? ????? ???? ??? ?????. ??? ??? ???? ?? ??? ???? ?? ??? ?? ???? ???? ?????? ???? ???? ?? ???? ???? ????? ? ? ????.
??? ??? ???? ??????? ?? ?? ??? ?? ?????? ??? ??????? ??? ???? ? ??? ? ????.
? ??? 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. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

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

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

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

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

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled
