3

I have to install 10+ APIs in my third_party folder, each has it´s own examples files for testing oauth validation and other features.

without too many changes, has anyone found an easy way to hack the Codeigniter routing to execute files like

$route['hackToken'] = "/application/third_party/googleads-php-lib-master/examples/AdWords/Auth/GetRefreshToken.php";
E.A.T
  • 848
  • 11
  • 24
  • i just thought about it a bit and realized the only thing stopping this `http://localhost/application/third_party/googleads-php-lib-master/examples/AdWords/Auth/GetRefreshToken.php` is your `.htaccess` file. i renamed it to stop.htacess and it works. if i do happen to many more htaccess files in the path, can anyone provide any answer with a `Bash` script to rename them and unrename them? – E.A.T Jan 20 '14 at 14:12
  • sorry damn typos!)... *If I do happen to have many more .htacess files, can someone provide an answer in `Bash` or `DOS` to rename and reserve them? – E.A.T Jan 20 '14 at 14:19
  • more important correction: in saying "it works", I meant that I can execute the file, but i am still not within Codeigniter to access `$CI = &get_instance();` Still, Any thoughts? – E.A.T Jan 20 '14 at 14:28

1 Answers1

1

Codeigniter expects to find a class derived from Controller at the target of a route. So, you will not be able to do this unless you create a Controller for each example.

Dwayne Towell
  • 8,154
  • 4
  • 36
  • 49