Jump to content

CoDeRs

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by CoDeRs

  1. I dont care too much about my ISP's domain but i checked my personal one on all of the basic Spamassassin black list sites and my domain does not show a red flag anywhere. I also have my email set up to send ALL Spam black flagged or not to my junk mail and it wasn't there either. It seems like it just went Poof!.
  2. So very sorry, too many languages running around with the hamster. They get all jumbled. No the reason is because putting a 2D array within quotes was not working. So i had to separate the strings. And using the wrong joining symbol caused all the errors. Something so simple and so obvious... yet it eluded me all day. I feel soo embarrassed.
  3. Hello, I tried to register to this site today using my personal emails (personal domains and ISP) and the activation email would not go though, I had to use a free email service ie. Google hotmail to receive the email. Just wondering why that is as i don't use my google email often. -Cody.
  4. Hey Guys, I am at work and i have to create a script to parse data from a TSV file into a database. The TSV file has to be sifted though before it is updated as they only want specific values in the database. Connecting to the DB and Using SQL is no problem for me. However for some reason my script is not outputting the data the way i want. Right now i am using fgets and explode to put the data into a 2D array, i have also used fgetcsv and i get the same results. Please see comments on where my errors are. Script demo output is http://www.codernetworks.com/Magellon/upload.php I feel that the code snipit below is very simple. <?php setlocale(LC_ALL, 'en_US.UTF-8'); //Tryed this as i was reading online. $nFileName = "ParentFolder/UnitFolder/TestFile.tsv"; //Hidden due to security reasons. $nRow = 1; $nFile = fopen($nFileName, "r"); if ($nFile !== FALSE) { while (!feof($nFile)) { $nLineData = fgets($nFile); //echo "$nLineData<br>"; //Debug, Works Fine. $nParsed = explode("\t", $nLineData, -1); echo "Parsed Line - " & $nParsed[0] & "<br>"; //Debug, Outputs Junk (eg Line 4 = @P) echo "<br> Parsed Line - $nParsed[0] <br>"; //Debug, Outputs Proper (eg Line 4 = #START) $nCols = count($nParsed); $nRow++; for ($i=0; $i < $nCols; $i++) { //Splitting Data into a 2D Array $nData[$nRow][$i] = $nParsed[$i]; } } echo "Processing Data<br>"; echo "-----------------------------------------------------<br>"; // Outputing Data from the 2D Array - Only receiving what i call junk. echo "Test Time Stamp - " & $nData[1][1] & "<br>"; echo "Test Time Stamp - " & $nData[2][1] & "<br>"; echo "Test Time Stamp - " & $nData[3][1] & "<br>"; echo "Test Time Stamp - " & $nData[4][1] & "<br>"; echo "Test Time Stamp - " & $nData[5][1] & "<br>"; echo "Test Time Stamp - " & $nData[6][1] & "<br>"; echo "Test Time Stamp - " & $nData[7][1] & "<br>"; fclose($nFile); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.