Re: Zend Framework - getParam() Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Howdy,

Mid, Net, thanks for the tips!  I actually didn't have the proper .htaccess
settings that ZF wanted, and I needed to add a router :)

Thank you both!

-Dan

On Sat, Mar 12, 2011 at 12:48 AM, Midhun Girish <midhungirish@xxxxxxxxx>wrote:

> You can also try routing in zend..
> http://codeutopia.net/blog/2007/11/16/routing-and-complex-urls-in-zend-framework/
>
> Midhun Girish
>
>
>
> On Sat, Mar 12, 2011 at 11:16 AM, NetEmp <net.served@xxxxxxxxx> wrote:
>
>> Hi Dan
>>
>> One method for this is to use URL Rewriting (which can be implemented on
>> Apache using htaccess).
>>
>> Through URL Rewriting you can first make the following URL:
>>
>> http://www.website.com/article-clean-url
>>
>> <http://www.website.com/article-clean-url>to internally behave as the
>> following:
>>
>> http://www.website.com/index/user/ <http://www.website.com/index/user/1>1
>>
>>
>> <http://www.website.com/index/user/1>and then you can use the same
>> getParam
>> method to grab the value and carry out further processing.
>>
>> Hope this helps.
>>
>> Cheers
>>
>> NetEmp
>>
>> On Sat, Mar 12, 2011 at 10:04 AM, Dan Joseph <dmjoseph@xxxxxxxxx> wrote:
>>
>> > Hi Everyone,
>> >
>> > Zend Framework getParam question....
>> >
>> > I'm trying to get a value from the url...
>> >
>> > I know how to grab:
>> >
>> > http;//www.website.com/index/user/1
>> >
>> > that's the index controller, $this->_getParam('user'); (value = 1)..
>> >
>> > What I'd like to be able to grab is just off one thing from the url...
>> > example..  I want to give an article a unique/clean url... so, when I go
>> > to:
>> >
>> > http://www.website.com/article-clean-url
>> >
>> > I can somehow grab that 'article-clean-url' as a value and use it for a
>> > lookup in the database.
>> >
>> > I've tried everything and search all over the place.  I can't find the
>> > answer.  Can someone tell me how this is done?  Thanks...
>> >
>> > --
>> > -Dan Joseph
>> >
>>
>
>


-- 
-Dan Joseph

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux