Can I write a file to the folder in the root directory on the USB

42 views
Skip to first unread message

Jeff Gregory

unread,
Feb 26, 2016, 6:23:02 AM2/26/16
to LibraryBox
Hello,

I love the Librarybox and am using modified versions in various locations. I have created as simple php contact form that stores the response in a text file in a 'contacts' folder I created inside the LibraryBox/Content folder.

the code in my php is as follows

$myfile = fopen("contacts/contacts-english.txt", "a")

I would prefer that this folder just be in the root of the USB but I cannot seem to make it happen. I would appreciate any pointers.

I am using LibraryBox 2.1

Many thanks

Jeff

Matthias Strubel

unread,
Feb 26, 2016, 7:33:26 AM2/26/16
to libra...@googlegroups.com
Hi,
yes, that should be possible, you only need to use an absolute path. I would recommend a path inside the LibraryBox folder, right beside the Content folder.

$myfile = fopen("/opt/piratebox/share/contacts/contacts-english.txt", "a")

or

#Directly on the USB Stick
$myfile = fopen("/mnt/usb/contacts/contacts-english.txt", "a")


best regards
Matthias

--
You received this message because you are subscribed to the Google Groups "LibraryBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to librarybox+...@googlegroups.com.
To post to this group, send email to libra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/librarybox/60ff6ca1-fb75-4d20-aa84-95e6e35c1a02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeff Gregory

unread,
Feb 29, 2016, 10:57:21 AM2/29/16
to LibraryBox
Many thanks
Reply all
Reply to author
Forward
0 new messages