What im trying to do is this.
I working on creating a poll script, and right now it consists of 3 main
files:
poll.php - Which does the server-side processing
pollFunctions.php - Which draws the poll and does some client side stuff
poll.css- stylesheet
Hi chris,
Haven't much time now but maybe you can find a way with those ideas:
in pollFunctions.php do :
$pollFunctions_path = str_replace( basename ( _FILE_ ) , '' , _FILE_ );
in foo.php do :
$foo_path = str_replace( basename ( _FILE_ ) , '' , _FILE_ );
Now you just have to compute the diff
Ok found his one on some old libs of mine, guess this should work but i
am not sure :
?php
function find_relativ_path( $origin , $target ){
$append = '';
$string = '';
$origin = explode('/',$origin);
$target = explode('/',$target);
unset($origin[(count($origin)-1)]);
--- Chris Thomas [EMAIL PROTECTED] wrote:
I working on creating a poll script, and right now it consists of 3
main files:
poll.php
pollFunctions.php
poll.css
These files reside in the /poll directory (for now)
[snip]
So what im trying to figure out is the relative url of where the
--- Chris Thomas [EMAIL PROTECTED] wrote:
Is there anyway that i can get a url relative to my server for a
script that is being run??
$relative_url = '/';
That's a relative URL to your document root. What are you wanting,
exactly?
Chris
=
Chris Shiflett - http://shiflett.org/
PHP
Is there anyway that i can get a url relative to my server
for a script that is being run??
The script is being included in mulitple files and
$_SERVER['SCRIPT_NAME'] just gives me the name of the file
that is including the other scripts.
Also $_SERVER['SCRIPT_FILENAME'] is returning
6 matches
Mail list logo