解密 加密 '); $contents = substr($contents, $headerPos + 5, $footerPos - $headerPos); $encode = base64_encode(gzdeflate($contents)); // 开始编码 $encode = ' "; return file_put_contents($filename, $encode); } return false; } //调用函
加密
'); $contents = substr($contents, $headerPos + 5, $footerPos - $headerPos); $encode = base64_encode(gzdeflate($contents)); // 开始编码 $encode = ' "; return file_put_contents($filename, $encode); } return false; } //调用函数 $filename = 'index.php'; encode_file_contents($filename); echo "OK,加密完成!" ?>