Welcome Guest, Not a member yet? Register   Sign In
Direct Links to HTML files in a Directory a Bad Idea?
#1

[eluser]zimco[/eluser]
My CI application has a folder full of straight HTML files that i would like to give access to the user to open and read in their browser thru a list of direct links to the files.

The list of all files in this directory was gotten by using the get_filenames('path/to/directory/') method from the CI helper['file'] in a controller, then the list of files names was passed to the view. Where I created the links to all the files with the following statement in the view:

Code:
//Generate links to files
echo ('<a href="'. base_url() . 'system/application/stockhtml/' . $filelist[$i] . '">'. $filelist[$i] . '</a><br/>');

Is it safe to create the link to the files in the stockhtml directory the way i have done it above? Or is there a better way to do it? Is exposing the 'system/application' part of the path to the user in the URL bad?


Messages In This Thread
Direct Links to HTML files in a Directory a Bad Idea? - by El Forum - 05-19-2008, 11:14 AM
Direct Links to HTML files in a Directory a Bad Idea? - by El Forum - 05-19-2008, 12:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB