What function are you using to get the file? Remember that if you are using fopen, the second parameter will be the type of access you want, in this case it would be "r". Anything else and PHP will yell at you.

For ease of use, I'd go with file() instead. It'll return the file in an array which is very convenient for flat-file databases.

-Jon J.

p.s. I realize I'm stating the obvious here, but did you verify that the path
"http://virtual1.example.com/data/directory.data"; is where the file is actually located?





From: Wade Preston Shearer <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: BYU UUG Post <[EMAIL PROTECTED]>
Subject: [uug] reading a flat-file database in on another
Date: Wed, 26 Feb 2003 16:01:59 -0700

i have a script, on...

virtual1.example.com


...that reads a flat-file database...


/data/database.data


which works quite well.


on...

virtual2.example.com


i put the same script, but didn't want to manage two copies of the same database, thus killing the point of having a database. so, instead of putting...


$filename ="data/directory.data";


...in the top of the script, i put...


$filename ="http://virtual1.example.com/data/directory.data";;


...but it didn't work. i'm guessing that there are some security things are prevent this or something, but am not sure. do i not have the syntacs correct?


-wade preston


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://phantom.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to