我正在使用Salesforce元數據API。我正在創建一個base64數據,其中包含一個項目清單,一個名爲package.xml
的文件。如何從這些數據中獲取package.xml
文件。如何從PHP中的Base64Binary編碼數據獲取原始數據?
請參考下面的編碼數據:
UEsDBBQACAAIAOcycUEAAAAAAAAAAAAAAAAhAAAAdW5wYWNrYWdlZC9vYmplY3RzL0NvbnRhY3Qub2JqZWN01Vffb9owEH7nr4jyPpxO0zRNIRWlVKDxS5CNR2SSC/FwHGo7tPnv65CAE0CoUFYxnnKfz+fvvrtLjH3/GlFjDVyQmDXMu7plGsC82Cds0TB/u09ffpj3Ts1uJULG0XD+FzxpqC1MNMxQytVPhESMV3URxNyDuhdH6KtlfUfWNxSBxD6W2HRqhvrZwPCcwhOALxzJE7BRGcl9AgJ0a+RAQukAR+D0MFskeAFiNvNstIO1J7xK4AzTru8EmIosvEa0G8VzoDqajXKg5ABsIUPnzrLUWv6sFzk8J4TD7oidrV0kx94yy6lDlGQ83boe4KUt6QocV9FVXtmjXkkYeU5gG6KwcqlQWatTwgH2J3GiqnNUthXxllQx0lAF/oNpAqK6WI0/hfmxwDtHHwKcULnNYWtWj0OnzjuDzCiMGRhdllUlvSFamEsG3BhDAJxjekPMVGOEWIBv9JT/7fAayhD4v6YjYi71LBdW7XDz/qiOCrw8rmfM4xrodV5iWaTDF9iHJ3oCXsx8fEsD5AKX5KYYjTiJPoHQJS164QfoHV29oUng5WhjNyltxUxiT4qjvR0Qqlp54sUqeFvdOFIZqktGdoLG91tcxTR00FKnK6PK5TS3B8Jl6ONUuCERfRUwvALFHN2v2EYwpzUcuM2WW3/ojt3OY9NtF0ruOauAHEt19XLURUKVyUYaqXqus+5w3E53Muur2B0b5UipFw74FCLukjey7I0i/cvF7KfvrnOfMDhd4X56lQIP4KWHhZwCLD+psq1xW5X1cXa94vaaE3c2bbd/nVFblbeRJW7kmX9IwKw7/msBN9NxgYCbsTgtoI3K/4Cc2htQSwcIRtMK5HUCAAA4DQAAUEsDBBQACAAIAOcycUEAAAAAAAAAAAAAAAAWAAAAdW5wYWNrYWdlZC9wYWNrYWdlLnhtbE2OzQrCMBCE732KkLvZWKSIpOmh4FUP+gBpumrVJKVZRd/e2h90TzPDx+yo4uXu7IldbILP+VJIztDbUDf+nPPjYbtY80Inam/szZyR9bSPOb8QtRuAGEwr4il0FoUNDlIpM5ArcEimNmS4Tlh/it4txlEP3qGr+pe6DJ6MJQVz8EO8cajLR6TgdtUVv9AQjYXw16im9TrNhFQwu0TBNFonH1BLBwj45N4QogAAAOYAAABQSwECFAAUAAgACADnMnFBRtMK5HUCAAA4DQAAIQAAAAAAAAAAAAAAAAAAAAAAdW5wYWNrYWdlZC9vYmplY3RzL0NvbnRhY3Qub2JqZWN0UEsBAhQAFAAIAAgA5zJxQfjk3hCiAAAA5gAAABYAAAAAAAAAAAAAAAAAxAIAAHVucGFja2FnZWQvcGFja2FnZS54bWxQSwUGAAAAAAIAAgCTAAAAqgMAAAAA
我使用BASE64_DECODE()方法,但我得到的輸出象下面這樣:
PKç2qA!unpackaged/objects/Contact.objectÕWßoÚ0~篈ò>œNÓ4M!¥T ñKGd’ñpj;´ùïë€@¨PV1žrŸÏçï¾»KŒ}ÿQc \˜5Ì»ºeÀ¼Ø'lÑ0»O_~˜÷NÍn%BÆÑpþ–Øtj†úÙÀðœÂ€/É°QÉ}tkä@BéGàô0[$xb6ól´ƒµ'¼JàӮ,¼F´Ås :šr äl!CçβÔZþ¬9<'„Ãîˆ]$ÇÞ2Ë©C」d<ݺà¥-é WÑU^Ù£^IyN`¢°r©PY«SÂö'q¢ªsT¶ñ–T1ÒPþƒi¢ºX?…ù±À;GœP¹ÍakVC§Î;ƒÌ(Œ]–U%½!Z˜KÜCœczCÌTc„X€oô」ÿíðÊø¿¦#b.õ,Vípóþ¨Ž ¼<®gÌãèu^bY¤Ã؇'z^Ì||Kä—ä¦8‰>Ð%-záè]½¡Iàåhc7)mÅLbOŠ£½ªZyâÅ*x[Ý8RªKFv‚Æ÷[\Å4tÐR§+£Êå4·ÂeèãT¸!}0¼ÅݯØF0§5¸Í–[èŽÝÎcÓmJî9«€KuõrÔEB•ÉF©z®³îpÜNw2ë«ØåH©ø"î’7²ì"ýËÅì§ï®sŸ08]á~z•à¥‡…œ,?©²q[•õqv½âöšw6m·Q[•·‘%nä™HÀ¬;þk7Óq€›±8- Êÿ€œÚPKFÓ äu8 PKç2qAunpackaged/package.xmlMŽÍ Â0„ï}Š»ÙX¤ˆ¤é¡àUúiºjÕ$¥YEßÞÚtO3ÃÇì¨âåîì‰]l‚ÏùRHÎÐÛP7þœóãa»XóB'joìÍœ‘õ´9¿µ€L+â)t… R)3+pH¦6d¸NXŠÞ-ÆQÞ¡«ú—ºžŒ%sðC¼q¨ËG¤àvÕ¿Ð…ðר¦õ:Í„T0»DÁ4Z'PKøäÞ¢æPKç2qAFÓ äu8 !unpackaged/objects/Contact.objectPKç2qAøäÞ¢æÄunpackaged/package.xmlPK「ª
這看起來像一個zip文件可能。 – Musa
我想你會得到正確的解碼字符串。它看起來像一個壓縮或加密的文件。 –