使用PHP处理DIST文件

我有一个矩阵文件(.dist),上载时,我想检查参数是否在其中得到满足。例如,在文件中,第一列显示数字123,其余文件的总和为123。

**124**
AB**62**_A01 0.112 0.000
 0.012 0.320 0.179
AB**62**_A02 0.125 0.123
 0.213 0.235 0.000   

在上面的示例中,第一列显示62 + 62 = 124。我想检查使用PHP是否满足此要求。 这是我到目前为止使用的代码:

private function validateinput($N) {

    if ($_FILES["file"]["type"] == ".dist") {

        $target_path = "uploads/";
        $target_path = $target_path //add a file path  .
        basename( $_FILES['uploadedfile']['name']); 

        if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'],$target_path)) {
            echo "The file ".  basename( $_FILES['uploadedfile']['name']). 
        " has been uploaded";
        } else{
            echo "There was an error uploading the file,please try again!";
        }

        if ($_FILES["file"]["type"] =! ".dist")
            echo "Invalid file input";
        {

            file_get_contents($_FILES['uploadedfile']['tmp_name'],$target_path);

一旦检查了文件类型,程序应检查第一列,然后检查添加是否正确。任何帮助将不胜感激。

hinaliuyinyuan1 回答:使用PHP处理DIST文件

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2986060.html

大家都在问