Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 从post解码base64_Php_Decode - Fatal编程技术网

Php 从post解码base64

Php 从post解码base64,php,decode,Php,Decode,我正在编写一个脚本,它将发送特定目录中列出的所有文件并发布它们。到目前为止,我有这个 $http = new HTTPConnection(array(array("SERVER"=>"server details", "SECURE"=>false, "METHOD"=>"POST", "URI"=>"/sender.php"))); $http->set_var("name","./test"); $http->set_var("file", ba

我正在编写一个脚本,它将发送特定目录中列出的所有文件并发布它们。到目前为止,我有这个

    $http = new HTTPConnection(array(array("SERVER"=>"server details", "SECURE"=>false, "METHOD"=>"POST", "URI"=>"/sender.php")));
$http->set_var("name","./test");
$http->set_var("file", base64_encode(file_get_contents('./test/csv.php', true)));
$http->exchange();
现在我希望能够解码文件,但base64_解码的文档有点模糊

到目前为止我有

$info = $_POST['file'];
echo base64_decode($info);
我得到的错误是未定义的index:file,我不确定如何从这里开始

非常感谢您的帮助


谢谢

未定义索引:文件
与base64无关。这意味着
$\u POST
不包含名为
file
的键。检查您的表单。
$\u POST
不包含这些文件。文件存储在
$\u文件中
什么是类
HTTPConnection
?你不能指望人们神奇地知道那东西是什么以及它是如何工作的。