Ya, I tried,
but as I mentioned the link_to() triggers session_start(), but I don't
need that, and the returned link seems to been strange like:
/batch/email_alert.php/{module}/{action}/....
On 4月12日, 上午12時57分, "Pedro Casado" <[EMAIL PROTECTED]> wrote:
> Maybe you should try something like this: sfLoader::loadHelpers('Url');
>
> --
> Att,
> Pedro Casado
>
> On Fri, Apr 11, 2008 at 12:38 PM, SNake! <[EMAIL PROTECTED]> wrote:
>
> > Dear All,
>
> > I am writing a batch for sending email in symfony. One problem is that
> > I want to delivery some link to ppl, so link_to is needed , but the
> > link of calling link_to seem to init a session , and error like:
>
> > Warning: session_start(): Cannot send session cookie - headers
> > already sent by (output started at ~/email_alert.php:29) in ~/\pear
> > \symfony\storage\sfSessionStorage.class.php on line 77
>
> > Then I googled for a while, some ppl said , I have to do sth like:
>
> > define('SF_ENVIRONMENT', 'cli')
>
> > But in cli mode, I got fatel error:
>
> > PHP Fatal error: Uncaught exception 'sfException' with message 'Call
> > to undefined method sfController::genUrl' in~\pear\symfony\controller
> > \sfController.class.php:653
>
> > I know the problem is caused by the sfController, could I stop its
> > session managment?
>
> > Snake
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---