Error message "error:0308010C:digital envelope routines::unsupported"
我在尝试打开文件时收到错误.pfx
:
$result = openssl_pkcs12_read($content, $certdata, $pass);
$error = openssl_error_string(); // "error:0308010C:digital envelope routines::unsupported"
Run Code Online (Sandbox Code Playgroud)
在终端(Ubuntu 22.04)中:
user@user-tp:~$ php -i | grep -i openssl
SSL Version => OpenSSL/3.0.2
libSSH Version => libssh/0.9.6/openssl/zlib
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 3.0.2 15 Mar 2022
OpenSSL Header Version => OpenSSL 3.0.2 15 Mar 2022
Openssl default config => /usr/lib/ssl/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
Native …
Run Code Online (Sandbox Code Playgroud) 我正在迁移我的 Vue2 应用程序来使用@vue/composition-api
(Vue 版本仍然是 2 而不是 3)。
在 Vue2 中我使用我的插件,this.$session
但this
在 Vue3 上不起作用。我找到的解决方案是这样使用:
setup (props, context) {
context.root.$session // works fine
context.root.$anotherPlugin
}
Run Code Online (Sandbox Code Playgroud)
然而在 Vue3 中context.root
是@deprecated
这样,当我迁移到 Vue3 时它就不再工作了。
还有其他方法可以访问里面的Vue实例吗setup()
?我想如果我可以访问它,我就可以在 Vue3 上正常使用这些插件。
如何对 Vue 组件数据使用对象解构?这是我的实际代码:
data: () => ({
descricao: '',
perfilBase: null,
anotherField: '',
otherOne: false
}),
mounted () {
this.descricao = this.$route.query.descricao
this.perfilBase = this.$route.query.perfilBase
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这样呢?是否可以?
mounted () {
{ this.descricao, this.perfilBase } = ...this.$route.query
}
Run Code Online (Sandbox Code Playgroud) 我想知道是否有可能以某种方式自动加载所有Auth::user()
关系。
Auth::user()
返回 my 的一个实例App\Models\Auth\Usuario.php
,并且在Usuario.php
类内部我与其他模型有一些关系。
我现在这样做的方式是手动加载关系,$user->load('relation')
但我需要在每个请求中都这样做。
我想在我的基本控制器中做这样的事情:
public function __construct()
{
$user = Auth::user();
$this->relation = $user->load('relation');
}
Run Code Online (Sandbox Code Playgroud)
但这不正是我要找的。
还有另一种/最好的方法来加载所有的Auth::user()
类关系吗?比如中间件之类的?
javascript ×2
laravel ×2
php ×2
vue.js ×2
ecmascript-6 ×1
eloquent ×1
openssl ×1
ubuntu ×1
vuejs3 ×1