At 6/19/2003 10:41 PM, Kyle Babich wrote:

> Inside of another file I'm trying to read setup.txt into $rawSetupData and explode that with \r\n's
> into an array called $setupData.


Why on earth?

http://us4.php.net/file


> <?php > > if (file_exists("setup.txt")) { > $rawSetupData = readfile("setup.txt"); > $setupData = explode("\r\n", $rawSetupData); > echo $setupData[0]; > } > else echo "Error opening \"setup.txt\""; > > ?>

No no nonono

<?
        if ($file_exists("setup.txt")) {
                $setupData = file("setup.txt");
        }
        else {
                echo 'Error opening "setup.txt"';
        }
?>

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to