Welcome Guest, Not a member yet? Register   Sign In
Possible to duplicate current Code Igniter Controller for testing purposes?
#1

[eluser]Unknown[/eluser]
We have a program currently running on a production server and is accessed quite frequently - any live changes are usually detected by users within 10 minutes. I have been tasked with adjusting one of the functions on the site which I am comfortable making but am unsure how to dupe off a page so I do not have to work live.

For example:

The public interface runs from the url:

[root.com]/Production/index.php/daily_print/1/0/0/5309_no_search_event_5309/2012-12-06/normal/

It is my understanding that "daily_print" is a directory inside of the controllers directory of the code igniter application, I have found it there and copied the folder, renaming it to daily_print_test.
I have placed a PHP
Code:
<?php die("here's jonny"); ?>
die statement at the top of the daily_print_test/index.php page to determine that I am actually accessing that page, and when I navigate to :

[root.com]/Production/index.php/daily_print_test/

I see the "here's jonny" text, but when I navigate to:

/Production/index.php/daily_print_test/1/0/0/5309_no_search_event_5309/2012-12-06/normal/

I get a 404 not found error. Any help is greatly appreciated to helping me duplicate the current working controller to produce the same results that the current controller is producing. Is this possible without having to duplicate the entire server?
Thank you ahead of time.

- Jon
#2

[eluser]CroNiX[/eluser]
I'd check in /application/config/routes.php. There could be routes set up for the "daily_print" folder you'd need to replicate with your new one.
#3

[eluser]Unknown[/eluser]
This was exactly it, I worked through the tutorials in the user guide today and the routes.php was exactly what I needed to edit to create an additional route / duplicate.
Thank You for the response.
#4

[eluser]Aken[/eluser]
Highly recommend establishing a local work environment, so you can replicate and work on the entire website without your live production website ever being affected.

Version control, such as Git, is also incredibly useful for tracking changes, and reversing them back to a working version in case of a major problem.




Theme © iAndrew 2016 - Forum software by © MyBB