[Solar-talk] Wrong function in Solar_Controller_Front?

Paul M Jones pmjones at ciaweb.net
Thu Oct 19 07:31:50 PDT 2006


On Oct 19, 2006, at 12:06 AM, Rodrigo Moraes wrote:

> On 10/18/06, Koen Speelmeijer wrote:
>>>>  // pull the page name off the top of the path, use the default
>>  // if none specified
>>  $page = array_shift($uri->path);
>>>>
>> Is it just me or should it be array_pop instead? I find this quite  
>> suprising
>> because it's the Front Controller, the first thing used when  
>> setting up an
>> app.
>
> I think it is correct. It should be array_shift() because it is the
> first path after /index.php (or the domain) that should be taken.

Rodrigo is correct here; the idea is to strip down the URI as you  
pass deeper into the controller structure.


>
> Maybe you have changed the base path for the URI? In your config file:
>
>     $config['Solar_Uri_Action']['path'] = '/index.php/';
>
> (this is the default value in Solar_Uri_Action)

This is an important point.  Koen, are you accessing Solar as part of  
a subdirectory?  Can you show us the URI you're using to get to Solar  
apps?



--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.  <http://solarphp.com>

Join the Solar community wiki!  <http://solarphp.org>

Savant: The simple, elegant, and powerful solution for
templates in PHP.  <http://phpsavant.com>




More information about the solar-talk mailing list