簡體   English   中英

“ 406不可接受”問題的解決方案是什么?

[英]What is the solution to the “406 Not Acceptable” problem?

我有錯誤#406不可接受

只是當我在最終的api網址上添加“ url” http://時,就像這樣:

http://sl.abudayah.com/api.php?create=http://

我該如何解決?

解決“ 406不可接受”問題的解決方案是什么?

最好對傳遞的參數進行編碼。 如果您使用PHP生成URL,請使用rawurlencode

$url .= 'create=' . rawurlencode('http://'); // or however you get the appropriate string

如果您的鏈接是用另一種語言生成的或由人工生成的,則需要查找適當的編碼方式。 這完全取決於您想要什么,真的...

一種解決方案是查閱api的文檔,並找出可以接受的內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM