473,507 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

actual url ?

I am searching for a function which would return the exact
url where the script is actually being executed ?

like http://www.mydomain.com/scripts/this_script.php

Anyone can help?
--
Yang
Jul 17 '05 #1
5 1647
"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:21********************@news20.bellglobal.com. ..
I am searching for a function which would return the exact
url where the script is actually being executed ?

like http://www.mydomain.com/scripts/this_script.php


$_SERVER['HTTP_HOST'].$PHP_SELF

Jul 17 '05 #2
"Yang Li Ke" <ya******@sympatico.ca> wrote in message news:<21********************@news20.bellglobal.com >...
I am searching for a function which would return the exact
url where the script is actually being executed ?

like http://www.mydomain.com/scripts/this_script.php


print_r($_SERVER);

And see, how can you get it...

--
"Success = 10% sweat + 90% tears"
Email: rrjanbiah-at-Y!com
Jul 17 '05 #3
I noticed that Message-ID: <c0***********@news.ntu-kpi.kiev.ua> from
rostik contained the following:
like http://www.mydomain.com/scripts/this_script.php


$_SERVER['HTTP_HOST'].$PHP_SELF


$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] surely?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #4
Geoff Berrow <bl******@ckdog.co.uk> wrote or quoted:
rostik contained the following:

like http://www.mydomain.com/scripts/this_script.php


$_SERVER['HTTP_HOST'].$PHP_SELF


$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] surely?


That returns the address of the URL of the page that originally
called the script. The script may be in a different file
with a different URL.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #5
I noticed that Message-ID: <Hs********@bath.ac.uk> from Tim Tyler
contained the following:
>$_SERVER['HTTP_HOST'].$PHP_SELF


$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] surely?


That returns the address of the URL of the page that originally
called the script. The script may be in a different file
with a different URL.

OK, gotcha.

It's just that I've been working with pages that have query strings and
$_SERVER['PHP_SELF'] doesn't show them.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1853
by: jiing | last post by:
I want to use web interface to do : 1. user accounts management (adminstration side) 2. personal password management (user side) 3. create actual accounts under windows 2003 server( for handling...
13
5457
by: TC | last post by:
Folks Is there >>ANY<< way to get the actual text of an error that is trapped by the Form_Error event? I mean actual text like: "duplicate record in table XYZ", not template text like:...
9
7246
by: HL | last post by:
I am using VS 2005 Beta - C# Problem: The Timer fires a few milliseconds before the actual Due-Time Let's say a timer is created in the following manner: System.Threading.Timer m_timer = null;...
4
996
by: Ben de Vette | last post by:
Hi, is it possible to see the actual SQL command which is sent to Acces when using an OleDbDataAdapter? Al I can see now is that an update command failed. Why, is not told. Thanks in...
11
2277
by: Tomás | last post by:
Is there anywhere on the internet where you can download actual source code of an implementation of the C++ library? Stuff like: namespace std { class string { // actual code in here } }
1
1750
by: pinetaj | last post by:
Hello, I'd like to intercept some method invocations on certain object. For the object, I wrote a class inherited from ContextBoundObject. and also related classes to implement attribute,...
3
1167
by: probashi | last post by:
Hi, I have a SqlDataSource and there are 3 select parameters. I am using this data source for a Grid View Control. For my debugging purpose I would like to see the actual sql text going to...
4
7716
by: cbrichards via SQLMonster.com | last post by:
I have a stored procedure that will execute with less than 1,000 reads one time (with a specified set of parameters), then with a different set of parameters the procedure executes with close to...
3
3448
by: nospam | last post by:
I am trying to monitor the process of a file being copied, but I cannot find a function that will return the actual file size, not the total file size, as reported by fileinfo.length. Has anyone...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.