CodeIgniter Forums
Index.php Routing Question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Index.php Routing Question (/showthread.php?tid=19437)



Index.php Routing Question - El Forum - 06-07-2009

[eluser]codelearn[/eluser]
Hi Guys,

I'll explain really quickly what it is I want to get accomplished. Any help would be greatly appreciated:

1) I have a core CodeIgniter install sitting in my main FTP directory.
2) On 5 other FTP directories, I have the core install symlinked.

I need to be able to pass variables from the index.php of each of the 5 FTP directories that pass certain variables to the default controller.

Can anyone explain how to do this?

Thank you so much!


Index.php Routing Question - El Forum - 06-07-2009

[eluser]TheFuzzy0ne[/eluser]
I still don't understand what you are trying to achieve. If you want 6 separate sites sharing the same install, then each directory will need it's own index.php. Also, each application should have it's own application directory, it should only be the system directory that is shared.


Index.php Routing Question - El Forum - 06-09-2009

[eluser]codelearn[/eluser]
[quote author="TheFuzzy0ne" date="1244431987"]I still don't understand what you are trying to achieve. If you want 6 separate sites sharing the same install, then each directory will need it's own index.php. Also, each application should have it's own application directory, it should only be the system directory that is shared.[/quote]

All I need to do is pass ONE variable to the core install. I don't want to have to copy the applications folder 100 times just to change one variable.

Is that possible? TO pass vars with the index.php somehow?


Index.php Routing Question - El Forum - 06-09-2009

[eluser]TheFuzzy0ne[/eluser]
Can't you just shove it in a file, and include it from within each of your apps?


Index.php Routing Question - El Forum - 06-09-2009

[eluser]codelearn[/eluser]
How would I include a file (literally) from a view from within CodeIgniter Application/Views folder?


Index.php Routing Question - El Forum - 06-09-2009

[eluser]Dam1an[/eluser]
Code:
include 'path/to/file.php';

You can then access the vars as normal