请问这个错误是apache权限导致的吗?

PHP Fatal error: Uncaught exception 'RuntimeException' with message 'fopen (/sys/class/gpio/export): failed to open stream: Permission denied' in /home/pi/vendor/piphp/gpio/src/FileSystem/FileSystem.php:53\nStack trace:\n#0 /home/pi/vendor/piphp/gpio/src/FileSystem/FileSystem.php(14): PiPHP\\GPIO\\FileSystem\\FileSystem->exceptionIfFalse(false)\n#1 /home/pi/vendor/piphp/gpio/src/FileSystem/FileSystem.php(39): PiPHP\\GPIO\\FileSystem\\FileSystem->open('/sys/class/gpio...', 'w')\n#2 /home/pi/vendor/piphp/gpio/src/Pin/Pin.php(115): PiPHP\\GPIO\\FileSystem\\FileSystem->putContents('/sys/class/gpio...', 18)\n#3 /home/pi/vendor/piphp/gpio/src/Pin/Pin.php(55): PiPHP\\GPIO\\Pin\\Pin->writePinNumberToFile('/sys/class/gpio...')\n#4 /home/pi/vendor/piphp/gpio/src/Pin/Pin.php(39): PiPHP\\GPIO\\Pin\\Pin->export()\n#5 /home/pi/vendor/piphp/gpio/src/Pin/InputPin.php(19): PiPHP\\GPIO\\Pin\\Pin->__construct(Object(PiPHP\\GPIO\\FileSystem\ \FileSystem), 18)\n#6 /home/pi/vendor/piphp/gpio/src/GPIO.php(33): PiPHP\\GPIO\\Pin\\InputPin->__construct(Object(PiPHP\\GPIO\\FileSystem\\Fil in /home/pi/vendor/piphp/gpio/src/FileSystem/FileSystem.php on line 53, referer: http://192.168.2.202/

dragon33
浏览 1577回答 1
1回答

蛋肠加辣不要葱

这是php致命错误,应该是你的代码出了bug
打开App,查看更多内容
随时随地看视频慕课网APP