小编Tar*_*unn的帖子

如何在CakePHP上安装DebugKit

我正在学习如何使用CakePHP和我配置好的一切,但现在,我得到这个警告:

DebugKit is not installed. It will help you inspect and debug different aspects of your application. You can install it from github

我已经点击的链接,下载的应用程序,但我不知道在哪里放置这些文件夹...我使用的EasyPHP作为我的虚拟主机.
另外这里我遵循的步骤,
并且有:

`Ensure the plugin is loaded in app/Config/bootstrap.php by calling CakePlugin::load('DebugKit');` 
Run Code Online (Sandbox Code Playgroud)

但我不知道call这里有什么东西,有提示吗?

cakephp

22
推荐指数
1
解决办法
4万
查看次数

关于php artisan配置的Laravel 5:清除生成的Closure :: __ set_state()错误

我生产的代码和我跑了

php artisan config:clear
Run Code Online (Sandbox Code Playgroud)

之后,我的代码没有运行.索引页面和所有其他页面都显示为白屏,并在firebug中显示500内部服务器错误.当我试图跑

php artisan
Run Code Online (Sandbox Code Playgroud)

它给了我错误

PHP Fatal error:  Call to undefined method Closure::__set_state() in /var/www/live/vendor/config.php on line 56
Run Code Online (Sandbox Code Playgroud)

我的代码正在生产中!! 之前没有/vendor/config.php文件,该代码发生了什么?你有没有遇到过这样的错误?我已经授予存储/文件夹和vendor /的所有权限.任何帮助/指南将不胜感激.

php laravel-5

16
推荐指数
4
解决办法
2万
查看次数

Laravel 5 db:种子用户名和密码,但登录时不进行身份验证

我已实现数据库播种器以播种用户(默认)凭据。

Admin::create(['name' => 'Super Admin', 'email' => 'admin@demo.in', 'password' => bcrypt('password') ]);
Run Code Online (Sandbox Code Playgroud)

运行种子后,我收到了成功消息。但是当我尝试登录时,它说您的凭据不匹配。是否有任何特殊原因。我们不能用bcrypt播种用户数据吗?

authentication laravel laravel-5

3
推荐指数
1
解决办法
3949
查看次数

json_decode 未通过 curl 调用返回正确的 php api 响应数组

我正在为我的一位客户开发运输 API。我有供应商提供的运输 API。以json格式发出curl请求,json响应没有转换成php数组?找到下面的代码:

$params['format'] = 'json';
$params['data'] =json_encode($package_data);
$token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$url = "http://test.shipping.co/push/json/?token=".$token;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($params));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
$result = curl_exec($ch);
curl_close($ch);
print_r($result);
$results = json_decode($result, true);
print_r($results);
Run Code Online (Sandbox Code Playgroud)

这里我有 2 个 print_r 函数,以下是输出:

{ "cash_pickups_count": 1.0, "cod_count": 0, "success": true, "package_count": 1, "upload_wbn": "UPL21969440", "replacement_count": 0, "cod_amount": 0.0, "prepaid_count": 0 , "pickups_count": 0, "packages": [ { "status": "Success", "waybill": "0008110000125", "refnum": "8", "client": "demo", "remarks": " ", "cod_amount": 21841.0, …

php arrays json curl

2
推荐指数
1
解决办法
3292
查看次数

在laravel 5.2中无法发送没有发件人地址的邮件我已经设置了.env和mail.php

在忘记密码laravel发送电子邮件,给出错误,如:

Swift_TransportException in AbstractSmtpTransport.php line 162:
Run Code Online (Sandbox Code Playgroud)

没有发件人地址时无法发送邮件

我已经设定在我的邮件帐户的详细信息.envmail.php两种.

我的.env:

MAIL_DRIVER=smtp
MAIL_HOST=smtp-mail.outlook.com
MAIL_PORT=587
MAIL_USERNAME=raval_himanshu@live.in
MAIL_PASSWORD=pass
MAIL_ENCRYPTION=tls
Run Code Online (Sandbox Code Playgroud)

和我的mail.php是

<?php

return [   

'driver' => env('MAIL_DRIVER', 'smtp'),    

'host' => env('MAIL_HOST', 'smtp-mail.outlook.com'),    

'port' => env('MAIL_PORT', 587),  

'from' => ['raval_himanshu@live.in' => null, 'Himanshu Raval' => null],

/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security …
Run Code Online (Sandbox Code Playgroud)

php swiftmailer laravel laravel-5.2

-1
推荐指数
2
解决办法
1万
查看次数