web常见的问题详解

c4a3c134eb82485883d98532d833e4d3.png

这种是mysql的密码不对,自己去代码的.env里面改

8347c0c0a5ef4f3d8e87dc434957d53c.png

----------------------------------------------------_----------------------------------------------------------------------------

329444a9823546f682e391d0cf932f47.png

这种是mysql服务没有打开,可以点击此电脑,右键G,找到服务里面的Mysql,然后启动

也可以安ctrl+alt+delete,找到任务管理器,点击服务,然后启动mysql

-------------------------------------------------------------------------------------------------------------------------

创建文档后,点击www出现这种

b2b2c4266a4b410398ecc2d7343fb401.png

出现这种情况,应该是创建的时候就有问题了 

505b29f657c54bc0981cdfa59f8fd020.png

 应该先检查这个里面有没有对应的项目名称,没有就手动添加

40d20c3b970744a18f54853d1d1b806e.png

1b22d0b6ce5544209b5fa5ccfbbfc682.png

---------------------------------------------------------------------------------——----------------------------------

1d8245d225654fbd8bfa8e02117d3caa.png

 could not find driver (SQL: select * from information_schema.tables where table_schema = Todos and table_name = migrations and table_type = 'BASE TABLE')

  at E:\laragon\www\Todos\vendor\laravel\framework\src\Illuminate\Database\Connection.php:712
    708▕         // If an exception occurs when attempting to run a query, we'll format the error
    709▕         // message to include the bindings with SQL, which will make this exception a
    710▕         // lot more helpful to the developer instead of just the database's errors.
    711▕         catch (Exception $e) {
  ➜ 712▕             throw new QueryException(
    713▕                 $query, $this->prepareBindings($bindings), $e
    714▕             );
    715▕         }
    716▕     }

出现这个问题可就大了

解决办法:

5cbd60a6e2df46d9926bf0d616b07057.png

自己快速创建一个项目,然后中途按ctrl+c终端,然后在这个终端就能用了,cd到你之前的目录,然后进行操作,小黑面板和largon自带的可能都不行

-----------------------------------------------------------------------------------------------------------------------------

如果出现这种问题,就是端口号被占用了,可以照这个详情链接操作

Service Apache can not start. Reason:(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一-次。: AH00072: make_ sock_好了,ap的博客-CSDN博客

-----------------------------------___---------------------------------------------------------------------------------------- 

Illuminate\Contracts\Container\BindingResolutionException

Target class [DogController] does not exist.

 这种一般是没有use控制器,在你web.php里面的前面看看有没有这个

一些常用的命令

php artisan make:controller AboutController
php artisan make:model Todo
 php artisan make:migration create_todos_table//里面是表的结构

php artisan make:factory TodoFactory -m Todo//生成一个填充规则
php artisan make:seeder Toseeder//创建一个填充类
php artisan migrate:refresh//添加字段
php artisan db:seed//填充字段
migrate:refresh
php artisan make:model -csfm//一步创建成功

---------------------------------------------------------------------------------------------------------------------------------

如果没有样式,可能是引入在线的bootrstrap失效了,可参考:

样式没有了,怎么办???

---------------------------------------------------------------------------------------------------------------------------------

Class 'App\Http\Controllers\Todo' not found

 

--------------------------------------------------------------------------------------------------------------------------------


Warning: require(E:\laragon\www\Hifone-1.0\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in E:\laragon\www\Hifone-1.0\bootstrap\autoload.php on line 28

Fatal error: require(): Failed opening required 'E:\laragon\www\Hifone-1.0\bootstrap/../vendor/autoload.php' (include_path='.;E:/laragon/etc/php/pear') in E:\laragon\www\Hifone-1.0\bootstrap\autoload.php on line 28 

解决:

  1. cd 到该引用的根目录,删除 composer.lock 文件;

  2. 重新在根目录执行       composer install

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

西柚与蓝莓

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值