Yii框架连接数据库,操作数据库。

Yii框架连接数据库,操作数据库。

回复
  • 林忻曈用户
    [[{"txt": "Yii\u6846\u67b6\u8fde\u63a5\u6570\u636e\u5e93,\u64cd\u4f5c\u6570\u636e\u5e93\u3002"}], [{"txt": ["\u5de5\u5177/\u539f\u6599"]}, {"txt": "\u7535\u8111 \u4ee3\u7801\u7f16\u8f91\u5668"}], [{"txt": ["\u65b9\u6cd5/\u6b65\u9aa4"]}, {"txt": "MVC\u6846\u67b6C:controller \u00a0\u63a7\u5236\u5668V:view \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u89c6\u56feM\uff1amodel \u00a0\u00a0\u00a0\u6a21\u578b\u00a0\u64cd\u4f5c\u6570\u636e\u5e93\u6b65\u9aa4\uff1a1)\u00a0\u5efa\u7acb\u6570\u636e\u5e93php0507\u3001\u5efa\u7acb\u6570\u636e\u8868\u3001\u5199\u5165\u6d4b\u8bd5\u6570\u636e2)\u00a0\u901a\u8fc7Yii\u6846\u67b6\u8fde\u63a5\u6570\u636e\u5e93main.php"}, {"img": ["https://exp-picture.cdn.bcebos.com/a68c126efbf202b3f0372fcf30f4da5873dadb74.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "2.\u6ce8\u610f\uff1a\u6570\u636e\u5e93\u5185\u90e8\u5904\u7406\u8d70PDO\uff0c\u56e0\u6b64\u9700\u8981\u8ba9php\u5f00\u542fPDO\u6269\u5c55\u3002php.ini"}, {"img": ["https://exp-picture.cdn.bcebos.com/604e9556ad042e689809e75585f85856d43dd174.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "3.\u6d4b\u8bd5Yii \u6846\u67b6\u662f\u5426\u6709\u94fe\u63a5\u4e0a\u6570\u636e\u5e93\u5728\u63a7\u5236\u5668\u91cc\u8fb9\u968f\u4fbf\u4e00\u4e2a\u5730\u65b9\u8f93\u51fa\u4fe1\u606f\uff1avar_dump(Yii::app()->db);\u7ea2\u8272\u6587\u5b57\u610f\u601d\u662f\u83b7\u5f97\u6570\u636e\u5e93\u7ec4\u4ef6Yii::app()\uff1aYii\u6846\u67b6\u662f\u7eafOOP\u9762\u5411\u5bf9\u8c61\u6846\u67b6\uff0c\u6bcf\u6b21web\u8bf7\u6c42\uff0c\u76f8\u5f53\u4e8e\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u7c7b\u7684\u5bf9\u8c61\uff0c\u8ba9\u5bf9\u8c61\u8c03\u7528\u76f8\u5173\u65b9\u6cd5\u6267\u884c\u3002\u5bf9\u8c61\u662f\u6211\u4eec\u6846\u67b6\u5e94\u7528\u7684\u6838\u5fc3\u5bf9\u8c61\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ee3\u7801\u83b7\u5f97\u8fd9\u4e2a\u5e94\u7528\u5bf9\u8c61(Yii::app())\u3002\u4ee5\u4e0b\u4fe1\u606f\u51fa\u73b0\u8bf4\u660e\u6570\u636e\u5e93\u6709\u8fde\u63a5\u6210\u529f\u3002"}, {"img": ["https://exp-picture.cdn.bcebos.com/d47cb624d8e9ccd22c86e7ed0e40102a05e2c974.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "4.\u53ef\u4ee5\u5bf9\u6570\u636e\u5e93\u8fdb\u884c\u589e\u3001\u5220\u3001\u6539\u3001\u67e5\u64cd\u4f5cMVC\uff0c\u73b0\u5728\u6211\u4eec\u9700\u8981\u5236\u4f5cmodel\u6765\u64cd\u4f5c\u6570\u636e\u5e93\u00a0"}, {"img": ["https://exp-picture.cdn.bcebos.com/3b03be7aa010bc334dd8820f92efa25f0d143f75.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "5.\u521b\u5efamodel\u6a21\u578bgoods"}, {"img": ["https://exp-picture.cdn.bcebos.com/a007a9b1eef97fbde19c8207b74133bad2413375.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "6.\u5229\u7528\u6a21\u578b\u67e5\u8be2\u6570\u636e\u8868\u7684\u6570\u636e\uff0c\u5728\u540e\u53f0\u5b9e\u73b0\u5546\u54c1\u4fe1\u606f\u7684\u67e5\u8be2\u00a0\u6a21\u578b\uff1a\u6709\u591a\u5c11\u6570\u636e\u8868\uff0c\u5c31\u5efa\u7acb\u591a\u5c11\u6a21\u578b\u6a21\u578b\u5176\u5b9e\u5c31\u662f\u7c7b\u6211\u4eec\u5bf9\u6570\u636e\u5e93\u8fdb\u884c\u64cd\u4f5c\uff0c\u9700\u8981\u5b9e\u4f8b\u5316\u6a21\u578b\u7c7b\uff0c\u4ea7\u751f\u5bf9\u8c61\u901a\u8fc7\u5bf9\u8c61\u8c03\u7528\u76f8\u5173\u7684\u65b9\u6cd5\uff0c\u5c31\u53ef\u4ee5\u5b9e\u73b0\u6570\u636e\u5e93\u7684\u64cd\u4f5c\u00a0CActiveRecord\uff1a\u662f\u6d3b\u8dc3\u8bb0\u5f55\uff0cAR\uff0c\u597d\u591a\u6210\u719f\u6846\u67b6\u90fd\u6709\u6b64\u6280\u672f\u3002\u5c06\u6570\u636e\u8868\u7684\u76f8\u5173\u5185\u5bb9\u4ee5\u201c\u7c7b\u201d\u7684\u5f62\u5f0f\u5448\u73b0\u51fa\u6765\u3002\u5b66\u4e60AR\u6280\u672f\u3002"}, {"img": ["https://exp-picture.cdn.bcebos.com/d2001d7de137c976975ccb7144672b5fd4462b75.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}]]
    2024-11-22
    1楼
    回复

参与评论

游客评论不支持回复他人评论内容,如需回复他人评论内容请