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)

??? ??











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

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

tostaycurrentwithphpdevelopments ? bestpractices, followkeynewssources lifephp.netandphpweekly, adgytwithcommunitiesonforumsandconferences, readlingupdated andgrad indewfeatures, andreadorcontributetoopensourceproceprosts.first

phpbecamepupularforwebdevelopmentduetoiteofleneflening, whithhtml, wididepreadhostingsupport, andalargeecosystemincludingframeworkslikelaravelandcmsplatformsformslikewordpress.itexcelsinhandlingformsubmissions, managingussess, interptisussivers, ?? ???

TOSETTHERIGHTTIMEZONEINPHP, usedate_default_timezone_set () functionattStartOfyourscriptwitHavalidInlifiersuchas'America/new_york'.1.edate_default_timezone_set () beforeanydate/timeFunctions.2
