【发布时间】:2014-09-24 01:27:53
【问题描述】:
我正在尝试实现 Stripe API 的基本功能,当我需要您必须需要的 Stripe.php 文件时,由于某种原因出现 500 Internal Server Error...当我注释掉需要时,错误消失了但显然我不能使用API ..
基本要求...在模态日志中显示错误
require_once('/php/Stripe.php');
我检查了服务器错误,它给了我这个
Fatal error: Uncaught exception 'Exception' with message 'Stripe needs the Multibyte String PHP extension.' in /php/Stripe.php:13 Stack trace: #0 /home/stripepost.php(4): require_once() #1 {main} thrown in /php/Stripe.php on line 13
这一切都来自只需要文件..
【问题讨论】:
-
PHP 中的 500 错误意味着去检查 Web 服务器的错误日志。错误将在那里更详细。始终在开发或测试代码时启用 PHP 的错误显示。在脚本的顶部:
error_reporting(E_ALL); ini_set('display_errors', 1);,致命错误将打印到您的屏幕上。 -
你的致命错误是找不到那个文件,因为绝对路径不存在。
标签: php stripe-payments