我正在使用 gzcompress 和 gzuncompress 通过 url 发送 base64_encoded 数据(一个数组)。以下是示例代码,在某些服务器上我收到数据错误,而在某些服务器上一切运行顺利。我在这里做错了什么?我是否错过了偶尔导致数据损坏的东西?
$str='eNqFVduSoyAQ_RfnBxTxxj6mKq_7CZaJRK0xklEy2Zmp_fcFFRFo3PgSOKf7dJ8WrEhWkJ-JRDEJHmN3r8av8sp6Nga_JpKR4O2KoyjP5CrKNYXTP9zk3eafXFwJWs8aVnL2kEtEApTO8QkJWlrVdCwvjQ4OSeCiQqWhO1TkHKrP8sYGLpcpCX5Pr6qvVaQCyxftmnbmiIZwGMp_xYL7y5Xo1H3TtdxoKTdbgedlaXfPQDMDaQZcXJmo4cLqL6NfU11S7lU3_Ieisti-oNDCypE-aMX3xuKVMjeh6lRguoJe86S7OtyZmpHcdUgF993w7gZnqng2yrnbOEIrTnt6pwOfDJOE8tv5fDYSTW1Vs5fJOZ1ORqct-wS0RIY28kwRbxjoUD7DxvBwJh-dd2cMytU2coaBt12vEDoSQoYQUtsxKBQfC8VHQrEx6q0jDArhYyF8JITdcym3E1AoORZKjoQSQwir7RQUSo-F0iOhFDglXCJcJ-94T91LXDDLx-HYt4B8txcQPqTyFD45ZwN48WYbCkcXOho-p1G0MWy3cgOBL5jU1Ff27OV7dn3_eDJOoQZQZDDgJvLl69INjb9LRfCXKrLc2Hi_dbSvwVKQQfBcXGvhnjSLQdeqSbH6teLBYguHZlubSIbwzPtB1qjzyhUa9bwV2caAHU9N3D0WOgH8-bASXDDv3gp7PUKxTuE_P8tUbZZtZmaR7KlhXDAHivr7DzuC_e4%2C';
print_r(unserialize(gzuncompress(stripslashes(base64_decode(strtr($str, '-_,', '+/='))))));