??? ?? ??? ???? yii \ base \ ?? ???? ???? init () ? run () ???? ???????. 2. ??? ??? @?/ ??/ ????? ??????. 3. ?? () ?? begin () ? end () ??? ?? ??? ??????. 4. ??? ??? render () ???? ???? ???? ??? ? ? ????. 5. CSS/JS? ??? ?? ??? ???? ???? run ()? ??????.
YII?? ??? ?? ??? ???? YII \ Base \ Widget ???? ???? init () ?/?? run () ???? ???????. ??? ??? ?? ?? ? UI ??? ???? ????? ?? ? ??? ??? ??? ?? ?????. ???? ???? ??? ??? ????.
?? ???? ????
?? ???? ??????? ?? ????? ?????? (? : @app/Widgets/mywidget.php ). ???? ??? ???????.
?:
?? ???? ? \ ??;yii \ base \ ?? ??;
yii \ helpers \ html ??;
Class MyWidget? ??? ?????
{
?? $ ???;
?? ?? init ()
{
?? :: init ();
if (\ $ this-> message === null) {
\ $ this-> message = '?? ???';
}
}
?? ?? run ()
{
return html :: encode (\ $ this-> message);
}
}
?>
???? ?? ??
???? ?????? ??? ?? ?? () ? end () ????? ? ???? ??? ????? ??? ??? ?? ?? () .
?? (??? ??) :
App \ Widgets \ MyWidget? ??????.echo mywidget :: ?? ([
'???'=> '?????, ??!',
]);
?>
??? ??? (?? ?? ??? ??)? ??? ?? ?? ??? ??????.
mywidget :: ?? ([['???'=> '?????!',
]);
Echo '? ??? ?? ?? ?????.';
mywidget :: end ();
?>
? ?? OB_GET_CLEAN ()? ???? run () ????? ???? ????? view :: beginbody () ? ??? ????? ?? ?? ? ? ??????.
?? ??? ???
?? ??? ??? ?? Render () ???? ???? ?? ????? ??? ???????.
run () ??? ???? :
?? ?? run (){
return \ $ this-> render ( 'my-widget-view', [
'???'=> \ $ this-> ???,
]);
}
@?/??/??/mywidget-view.php ???? ??? ????. ??? ? ?? ?? ???? ????.
?? ?? (CSS/JS)
??? JavaScript ?? CSS? ??? ?? ?? ??? ???? ??? ??????.
?:
App \ Assets \ MywidgetAsset? ??????.?? ?? run ()
{
mywidgetAsset :: register (\ $ this-> view);
return \ $ this-> render ( 'my-widget-view', [
'???'=> \ $ this-> ???,
]);
}
????? YII?? ??? ?? ??? ???? ???? ?????. ??? ??? UI ??? ????? ??? ?????.
? ??? YII?? ??? ?? ??? ??? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

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

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

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

Stock Market GPT
? ??? ??? ?? AI ?? ?? ??

?? ??

??? ??

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

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

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

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

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

YII? ???? ??? ?? ??? ????????. 1) YII? MVC ???? ??, 2) Activerecordorm ??? ?????. 3) GII ?? ?? ??, 4) ??? YII? ?? ??, 5) ?????? ?? ??? ???????. ??? ??? ??? ??? ?? YII ??? ?? ?? ?? ??? ????? ?? ? ? ????.

???? YII ????? ???? ???? ? ???? ???????. 1. ActiveFixture? ???? ??? ???? ?? ??? ???? ????. 2. $? ?? ??? ??? ??????. 3. ???/?????? ??? ??? ?????. 4. FixTures () ???? ?? ??? ???? ??? ?????. 5. YII? ??? ? ???? ???????? ?????. ?? ??, userfixture? ???/fixtures/data/user.php ??? ??? ?????????. ????? ?? Assertion Verification? ?? $ this-> ??? [ 'user1']? ?? Alice? ???? ?? ? ????. YII? ??? FI? ?????

?? : YII2?? ???? ???? ????? password_reset_token ? ?? ?? ??? ???? ?? ? ??? ???? ???? ????? ??? ???? ??? ???? ???? ? ????? ???? ?? ? ??? ???????. ?? ??? ??? ????. 1. ?? ??? ???? ?? ??????? ?????. 2. ??? ???? GeneratePasswordResettoken ???? ???? ?? ??? ??? ???? 1 ??? ?? ??? ?????. 3. PasswordResetRequestform ?? ?? ??? ???? ???? ?? ?? ??? ????? ???? ????. 4. ? ????? ???? ?? ResetPasswordform ??? ??? ??????.

YII? ??? ?? SQL ??? ???? YII :: $ app-> db? ?? ??? ? ????. ??? ??? ????. 1. createCommand ()? ???? ?? ??? ????. 2. SQL ??? ???? ?? bindValue () ?? bindparam ()? ?? ??? ????; 3. QueryAll (), QueryOne () ? ?? ???? ???? ??? ?????. 4. ?? ? ???? ??? ?? insert () ? Update () ???? ?? ? ? ????. 5. SQL? ?? ???? ????? ????? ?? ????. 6. ??? ??? ?? ???? ?? ??? ??????? ??? ? ????. 7. QueryBuilder? ???? ??? ??? ?? ???? ???? ??????.

ToenabledebuggingModeinyii, installandandonfiguretheyii2-debugmodule.1.checkifyii2-debugisinstalledviacomposerusingcomposerrequi re-devyiisoft/yii2-debug.2.inconfig/web.php, addthedebugmoduletobootstrapandmodulesundernyii_env_dev.3.confirmyii_envisdefined

enablegiiinconfig/web.phpbyaddingthemoduleanduleandlallowedips, whenaccesshttp : //your-app-url/index.php? r = gii, usemodelgeneratortocreatemodelsfffromdatabasetables, andusecrudgeneratortegeneratecontretecontretecontreperationfforloperations.

yiiensuresDatainTegrityTransactionManagement, ?? rollbackonFailure.USEBEGINTRANSACTION () FORMANUALCONTROLORTRANSACTICT () withAclosureForaUtomaticCommit/Rollback.ActiverEcordModelSaUtomalityParticateIntransactionsWenusingThesAmeConnecti

TheWebDirectoryInyIservessAssAssHublicEntryPointForuserRUSREQUESTS, EnhancingsecurityAndorganization.ItContainsTheindex.phpfileandallstaticAssetSlikecss, js, andimages, thatsensItsensIbplicationFilessuchasconfigsandmodelsremainfppppppsidesofppppppsides. 1.
