getNewLineType example

if ($realPath === false) {
            throw new InvalidArgumentException(sprintf('Given file path "%s" does not exist', $filename));
        }

        $handler = fopen($realPath, 'r');
        if (!\is_resource($handler)) {
            throw new Exception(sprintf('The file "%s" cannot be opened', $realPath));
        }
        $this->_handler = $handler;

        $this->_newline = $this->getNewLineType();

        $this->_delimiter = $delimiter;
        if (empty($header)) {
            $this->_read();
            $this->_header = $this->_current;
        } else {
            $this->_header = $header;
        }
    }

    /** * This is the destructor. It closes the CSV file. */
Home | Imprint | This part of the site doesn't use cookies.