【发布时间】:2020-09-30 07:00:18
【问题描述】:
我正在尝试制作本教程(从这里 Forge : View your models )(php),我得到了带有 HTTP 错误 404 的空白页面,知道吗? 调试器中什么都没有,其他任何地方都没有... 调用此 uri http://localhost:3000/api/forge/oss/buckets 时出现此错误
( ! ) Notice: Undefined index: id in D:\ArMediaCG\www\...\AutoCad API Extention\apps\Forge\first_tutorial\server\oss.php on line 54
Call Stack
# Time Memory Function Location
1 0.8060 405488 {main}( ) ...\index.php:0
2 0.8591 519816 Klein\Klein->dispatch( ) ...\index.php:50
3 0.8661 552248 Klein\Klein->handleRouteCallback( ) ...\Klein.php:572
4 0.8661 552248 call_user_func:{D:\ArMediaCG\www\...\AutoCad API Extention\apps\Forge\first_tutorial\vendor\klein\klein\src\Klein\Klein.php:859} ( ) ...\Klein.php:859
5 0.8661 552248 {closure:D:\ArMediaCG\www\...\AutoCad API Extention\apps\Forge\first_tutorial\index.php:27-30}( ) ...\Klein.php:859
6 0.8661 552288 Autodesk\ForgeServices\DataManagement->getBucketsAndObjects( ) ...\index.php:29
( ! ) Fatal error: Uncaught InvalidArgumentException: Missing the required parameter $bucket_key when calling getObjects in D:\ArMediaCG\www\...\AutoCad API Extention\apps\Forge\first_tutorial\vendor\klein\klein\src\Klein\Klein.php on line 925
( ! ) Klein\Exceptions\UnhandledException: Missing the required parameter $bucket_key when calling getObjects in D:\ArMediaCG\www\...\AutoCad API Extention\apps\Forge\first_tutorial\vendor\klein\klein\src\Klein\Klein.php on line 925
Call Stack
# Time Memory Function Location
1 0.8060 405488 {main}( ) ...\index.php:0
2 0.8591 519816 Klein\Klein->dispatch( ) ...\index.php:50
3 0.8751 667432 Klein\Klein->error( ) ...\Klein.php:629
在尝试使用 localhost:3000/www/index.html 进行调试后,我在 oss.php 文件的第 65 行得到了这个 Notice: Only variables should be passed by reference。我还注意到已加载令牌和旧存储桶
【问题讨论】:
-
此异常被触发,因为
bucket_key未被提供给调用。这很奇怪,因为样本确实处理了这个异常。你能展示一下这背后的相关代码吗? -
您好,谢谢,不知道如何获取该 ID,我正在执行此代码 here
标签: php autodesk-forge