var_dump(sfContext::getInstance()->getRequest()-
>getUriPrefix(),sfContext::getInstance()->getRequest()-
>getRelativeUrlRoot());
string 'http://localhost'
string '/project/trunk/web'

$uri = sfContext::getInstance()->getRequest()-
>getUriPrefix().sfContext::getInstance()->getRequest()-
>getRelativeUrlRoot();

then I can just add the folder I want to the end of that. I haven't
been able to find another way. I assume this is prolly the best way?
Pretty gross code, is there anything out there that will give me the
url? I haven't uploaded this to be production server yet, but if
anyone else knows of a way to do this please let me know.

Thanks,
f1g

On Aug 15, 11:49 pm, Joshua Estes <f1gm...@gmail.com> wrote:
> I have a few different projects that are in sub directories. I'm
> trying to generate a url with an image in it. So the base url would 
> behttp://www.site.com/project/web
>
> The image is in the sf_upload_dir
> (http://www.site.com/project/web/uploads/image.png)
>
> How do I get the base URL with no script name? 
> iehttp://www.site.com/project/web
>
> Thanks,
> f1g

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to