上一页 1 2 3 4 5 6 7 8 9 ··· 36 下一页
摘要: yii2 配置bootstrap使用 配置 config/web.php 添加 people <?php ... $config = [ ... 'bootstrap' => ['log','people'], ... 'components' => [ 'people'=> [ 'class'=> 阅读全文
posted @ 2024-03-30 10:57 胡勇健 阅读(68) 评论(0) 推荐(0)
摘要: yii2 配置文件详情 简化的 web.php 配置文件 <?php return [ 'id' => 'app-id', // 应用程序的唯一标识符 'basePath' => dirname(__DIR__), // 应用程序的基础路径 'bootstrap' => ['log'], // 在应 阅读全文
posted @ 2024-03-30 10:39 胡勇健 阅读(113) 评论(0) 推荐(0)
摘要: yii2默认语言 全局配置 config/web.php 添加language $config = [ 'id' => 'basic', 'basePath' => dirname(__DIR__), 'language' => 'zh-CN', //全局设置为中文--推荐 ] 局部配置 Yii:: 阅读全文
posted @ 2024-03-30 10:24 胡勇健 阅读(29) 评论(0) 推荐(0)
摘要: yii2安装 安装composer curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer 安装yii2-basic composer create-project --pre 阅读全文
posted @ 2024-03-30 10:10 胡勇健 阅读(27) 评论(0) 推荐(0)
摘要: mysql8.0远程访问配置 一、修改bind-address 查找配置文件 my.conf which mysql /usr/bin/mysql --verbose --help | grep -A 1 'Default options' vi my.cnf bind-address = 127. 阅读全文
posted @ 2023-01-30 15:39 胡勇健 阅读(616) 评论(0) 推荐(0)
摘要: Yii2的ListView用法 控制器 public function actionListView() { $this->layout = false; $dataProvider = new ActiveDataProvider([ 'query' => Material::find()->or 阅读全文
posted @ 2022-11-09 12:10 胡勇健 阅读(86) 评论(0) 推荐(0)
摘要: Yii2 DetailView用法 控制器代码 public function actionDetailView(){ //获取一条记录 $model = Resource::find()->with(['resourceType'])->where(['id'=>7])->one(); retur 阅读全文
posted @ 2022-11-09 10:53 胡勇健 阅读(194) 评论(0) 推荐(0)
摘要: Yii2 小部件ActiveForm 用法 模板 <?php $form = ActiveForm::begin() ?> <?= $form->field($model, 'id')->hiddenInput() ?> <?= $form->field($model, 'title')->text 阅读全文
posted @ 2022-10-25 15:49 胡勇健 阅读(147) 评论(0) 推荐(0)
摘要: YII2小部件GridView用法 配置项 <?= GridView::widget([ 'dataProvider' => $dataProvider,//数据源提供 'filterModel' => $searchModel,//过滤器 'tableOptions' => [],//表格样式 ' 阅读全文
posted @ 2022-10-25 14:48 胡勇健 阅读(569) 评论(0) 推荐(0)
摘要: CentOS7 搭建 DNS 域名解析服务器 1. 安装 BIND 服务器软件并启动 yum -y install bind bind-chroot bind-utils systemctl start named.service //启动服务 systemctl enable named //设为 阅读全文
posted @ 2022-10-17 09:15 胡勇健 阅读(268) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 36 下一页