Jump to content

file directory


OAFC_Rob

Recommended Posts

I'm in the middle of making my own CMS system, where a user can create a page online via a text editor, I know how to create and save the file, but to make the process easier I would like to a function where a user can click a button find a list of files and folders, pick the folder location to save a new file to.

 

Instead of having to type something like this /commonPages/aboutUs/

 

with the file name being test.php

 

What would be the easiest way to do this?

 

I have just been looking at opendir() and my first thought was to use <input type="file" />, but then I remember that was only for inputting a particular file name, which would be useful for renaming a file at a later date.

 

For example, if we wanted to change test.php to something more meaningful ie history.php

Link to comment
https://forums.phpfreaks.com/topic/236620-file-directory/
Share on other sites

Yeah had a quick look at that and was trying to decide which was better for my situation, is there are any to implement either a browse button or structure that would make it easier for the user. I have quickly implemented opendir on the entire directory, echoing out files and folders.

 

This is a good start, but doesn't mean squat to the user really, any suggestions?

 

Also there could potentially be security risks coupled with this, ie the user seeing folders I dont want them to see or have access to. What limitations can I enforce?

Link to comment
https://forums.phpfreaks.com/topic/236620-file-directory/#findComment-1216684
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.