gpt4 book ai didi

php - fatal error : Class 'XSLTProcessor' not found - but is installed

转载 作者:行者123 更新时间:2023-12-02 06:49:38 24 4
gpt4 key购买 nike

当尝试执行以下操作时

$xsl = new XSLTProcessor();

我收到此错误

Fatal error: Class 'XSLTProcessor' not found in

我见过this question about this exact same error (和 this one )但我认为这是不同的。我是否正确地说(我已经测试过它并且似乎是)因为扩展详细信息显示在 phpinfo() 中,所以它确实安装正确?

enter image description here enter image description here enter image description here

是这样吗,或者无论安装成功,它总是显示在 phpinfo() 中吗?您知道安装成功后可能会出现什么错误吗?

我已经尝试了 PHP 的多个版本,但出于其值(value),我托管在 Azure 上并拥有 followed and checked the instructions here这进一步让我相信扩展已正确安装。

最佳答案

您如何启用 php_xsl Azure 上的扩展?如果您手动将 DLL 库上传到 Azure 并通过 How to: Enable extensions in the default PHP runtime通过 ini 设置配置部分进行配置。可能是您配置的DLL库与PHP版本或操作系统版本不匹配。

但是,Azure Web Apps 已包含 php_xsl.dll图书馆在 ext每个可用版本中 PHP 运行时的文件夹。但默认情况下 Azure PHP 运行时不会启用它。您可以登录Azure Web App服务的Kudu控制台站点,并直接进入默认的ext文件夹,例如 D:\Program Files (x86)\PHP\v7.0\ext 。您可以找到Azure提供的所有库。

因此,请删除您的旧配置,并尝试按照How to: Enable extensions in the default PHP runtime通过ini设置配置部分进行操作。 ,添加extensions.ini中的配置:

extension=php_xsl.dll

如有任何进一步的疑虑,请随时告诉我。

关于php - fatal error : Class 'XSLTProcessor' not found - but is installed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37279971/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com