Welcome Guest, Not a member yet? Register   Sign In
Accessing subfolder (containing data xml)
#1

[eluser]Unknown[/eluser]
Hi there, thanks for this great framework.

I started to build a site at office on a Windows machine (XAMPP installation). I copied my site on my home Linux PC. Everythings worked fine exept one thing. I stored XML files in

Code:
system/application/data/xml

and wrote little code to show a file listing on screen.

On my home PC I can't access the data folder (again, on the office machine, this is working perfectly). It shows all files if I use '.', 'system/' or 'system/application' but there it ends.

I installed the application in my ~/public_html and set base_url like the following.

Code:
$config['base_url']    = "http://localhost/~myname/";

and route as

Code:
$route['default_controller'] = "admin";

I have access via

Code:
http://localhost/~daniel/index.php/admin

Controllers and views are all working.

Can anyone help my to access my data/xml folder please ?
#2

[eluser]Nicholai[/eluser]
What about moving the files to a folder of the main site and using something like this:

$files = base_url();
$files.='/xml/';

Or even keeping them in place, but using the base_url() function to find them, so the code is portable to any machine?
#3

[eluser]Unknown[/eluser]
Thank you very much. This was the first idea I had when I got up this morning. You confirmed it and it worked.

Very cool Wink




Theme © iAndrew 2016 - Forum software by © MyBB