hi, first of all you should not access $_SERVER directly but use the appropriate symfony class instead. in this case its sfWebRequest [1] where you have a method getUri() [2] which should do what you want.
Also have a look at getPathInfo() [3] [1] http://www.symfony-project.org/api/1_4/sfWebRequest [2] http://www.symfony-project.org/api/1_4/sfWebRequest#method_geturi [3] http://www.symfony-project.org/api/1_4/sfWebRequest#method_getpathinfo cheers /christian On Sep 21, 10:49 am, erka <erka2...@gmail.com> wrote: > Example: Home › module › success page › .... > > this is my php code: > > function curPageURL() { > $pageURL = 'http'; > if ($_SERVER["HTTPS"] == "on") { > $pageURL .= "s"; > } $pageURL > > .= "://"; > if ($_SERVER["SERVER_PORT"] != "80") { > $pageURL .= '<a href='. > $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].'>1</a>'.' > <a > href='.$_SERVER["REQUEST_URI"].'>2</a>'; > } else { > $pageURL .= $_SERVER["SERVER_NAME"]. > $_SERVER["REQUEST_URI"]; > } return > > $pageURL; > } -- 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