简体   繁体   English

PHP代码可在xampp上运行,但不能在raspberry pi上运行

[英]PHP code working on xampp but it does not work on raspberry pi

I have built a code to call PayPal REST API to pay by credit card. 我已经建立了一个代码来调用PayPal REST API以信用卡付款。 I have it nicely works on Xampp but it does not work on raspberry pi. 我在Xampp上很好用,但在树莓派上不起作用。 It's return 回来了

Internal server error 500 内部服务器错误500

when I enable the debug to finger out what is the actual error I get 当我启用调试以指出什么是实际错误时

Class 'PayPal\\Api\\fundingInstrument' not found in 找不到“ PayPal \\ Api \\ fundingInstrument”类

No idea why I am getting this error since it's working on Xampp 不知道为什么我会因为在Xampp上工作而收到此错误

please Help? 请帮忙?

If you are using composer there are some methods. 如果您使用作曲家,则有一些方法。

  1. Install composer in rasp in the project folder then do php composer.phar dump-autoload 在项目文件夹中的rasp中安装composer,然后执行php composer.phar dump-autoload
  2. In xampp do php composer.phar dump-autoload then upload the project again to rasp. 在xampp中执行php composer.phar dump-autoload然后再次将项目上传到rasp。

If you are not using composer just do require_once("File to require") 如果您不使用作曲家, require_once("File to require")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM