Get Current Location?
How do I get the full URL of the page I'm currently at?
View 3 Replies (Posted: June 12th, 2001, 06:04 PM)
Sponsored Links:
Related Forum Messages:
Echo Current Location
i echo the current location. like the current URL posted on the title bar. for example the current location is http://phpbuilder.com/board/showthread.php?p=10765321,,
Posted: 11-12-2006, 09:05 PM
View 1 Replies!
View Related
Get Text File Creation/Current Directory Location?
function out of a class i am currently working which is an API so i dont fully know the server setup it will run on but do want to offer caching so am using few checks.Anyway... my issue is with creating a text file, my understanding of the directory setup is that . means your current directory, when running this script on a server without memcache i am getting the error "could not create a cache text file" which is from fopen yet my if function before this checks if the folder is writeable, and also the /cache/ folder is created and has 0775 permissions does fopen allow ./cache/blah.txt ??P.S $this->debug is set to TRUE at the time of running the script, so i can see the errors private function write_cache($information, $username){ if(class_exists("Memcache")){//if memcache is installed [code]....
Posted: 06-18-2010, 07:34 PM
View 1 Replies!
View Related
Get Current Window Location To Send As Parameter To External JS?
I am embedding a external js file on some domains and I need to get the current location of the their URL to send to the server before the script is rendered and not after. I need to this dynamically so I cannot have the user specify the url themselves. For example I have a script: <script type="text/javascript" src="file.js?url=NEED THIS"></script> I would love to simply replace NEED THIS with window.location.href, however sadly this would not work. The main problem is that I need to get the url and parse it on the server side to generate the content file.js will deliver so I need this url passed to file.js at the beginning. How can I achieve this without using a iframe?
Posted: May 9 at 3:23
View 1 Replies!
View Related
Change Class="current" Location In A List?
have already created my panel tabs with the help of <ol>, <li> and css. it is working perfectly but then there is one problem that occured in the program. this tab <li class="current">the purpose of the class=current that is set in a specified link will help change the background image of the active link. the css code for that is already set and working. I will first show you the codes i used here: <ol id="toc"> <li> </li> [code]........
Posted: May 18 at 7:57
View 1 Replies!
View Related
Mobile Web App - Identify Its Location And Display Information Dependent On That Location
I'm in the process of building a mobile web app for phones with wireless and gps, I need the app to be able to identify its location and display information dependent on that location. Eg: One of the apps I've been asked to develop is for a building company. They want their inspectors to be able to visit each building site and open up their control panel and immediately have the information available for that particular location. It also has to offer alternatives, eg if the building site is close to another building site they should be able to select the correct on.
Posted: January 04, 2010, 02:32:59 PM
View 4 Replies!
View Related
Set A Default Value For The Location Field Of A Location Element In Drupal?
I am trying to set a default value for the location field of a location element in a Drupal form. I have figured out how to set default values for all of the other fields (address, additional address, city, state, zip, country) but can't figure out how to set the actual location default. My code: $settings = array( 'multiple' => array('min' => 0, 'add' => 1, 'max' => 1), 'form' => array( 'collapsible' => FALSE, [code].... how to set the default value for the actual location field? I'm sure it's easy but I can't figure it out/find it in the docs for the Location module's API.
Posted: Jan 31 10 at 22:38
View 2 Replies!
View Related
"header (location)" Inside IFRAME To Load In _top Location?
I have a simple form which is inside IFRAME. When user click on SUBMIT, it redirects to a specific page on my server. The function I use for the redirect is header ('Location: mypage2.html'); exit (); But I want the new page to open in _top location, not inside the same IFRAME that I use. How can I tell the browser to open the new page in _top not inside the IFRAME?
Posted: Jun 6 10 at 18:28
View 3 Replies!
View Related
Jquery - Ajax And The Ampersand Conundrum - Share The Current Time Of The Current Track
I know that I should encodeURI any url passed to anything else, because I read this: [URL] I want to share the current time of the current track I am listening to. So I installed the excellent yoururls shortener. And I have a bit of code that puts all the bits together, and makes the following: track=2&time=967 As I don't want everyone seeing my private key, I have a little php file which takes the input, and appends the following, so it looks like this: [URL] So in the main page, I call the jquery of $("div.shorturl").load(loadall); It then does a little bit of CURL and then shortener returns a nice short URL. [Code].... Except... the URL which is shortened is always in the form of [URL] - anything after the ampersand is shortened. I have tried wrapping the whole URL in php's URLencode, I've wrapped the track=2&time=967 in both encodeURI and encodeURIComponent, I've evem tried wrapping the whole thing in one or both. And still, the & breaks it, even though I can see the submitted url looks like track=1%26time%3D5 at the end. If I paste this or even the "plain" version with the unencoded url either into the yoururls interface, or submit it to the yoururls via the api as a normal URL pasted into the location bar of the browser, again it works perfectly. So it's not yoururls at fault, it seems like the url is being encoded properly, the only thing I can think of is CURL possibly? Now at this point you might be thinking "why not replace the & with a * and then convert it back again?". OK, so when the url is expanded, I get the values from var track = $.getUrlVar('track'); var time = $.getUrlVar('time'); so I COULD lose the time var, then do a bit of finding on where the * is in track and then assume the rest of anything after * is the time, but it's a bit ugly, and more to the point, it's not really the correct way to do things.
Posted: Aug 18 10 at 17:05
View 2 Replies!
View Related
Ignore Current ID When Checking Current Email Address?
When editing user accounts I want it to not be able to change the e-mail address into existing ones on other rows, but when submitting the form it takes into account that this particular rows email address is the same as the one which was sent via $_POST and throws up the error. The desired behaviour I want is for it to ignore the ID of the row which was posted, but take into account every other row. Here's the code as it stands at the moment: $email = $_POST['email']; $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'"); } if (mysql_num_rows($checkemail) > 0) { return $this->error("The e-mail address you provided is already associated with an account."); }
Posted: February 18, 2011, 09:24:28 PM
View 2 Replies!
View Related
Get The Full Current Web Url Including Current #anchor?
Dear fellow earthlings, a question about the URL of a current page. On my page there is a div with "Share this link" box, where the php has to echo the curent domain + page link, everything, including thecurrent anchor "#" <?=$currentlink?> could be "http://website.org/language/page#anchor17" Question A is it possible for php to know and echo the full current link all the way from the first httpL//.... till #anchorxxx ? Question B Whats the php function to show the entire current url?
Posted: Feb 26 at 19:18
View 1 Replies!
View Related
Html - Select <option Selected=""> Doesn't Work - Year And Month Automatically Sets To The Current Year And Current Month
I have 3 html <select> the year, month, and day. Both the year and month automatically sets to the current year and current month. I did that purely in PHP. However, the day which is being triggered by Javascript doesn't seem to work even though I already did if (j == <?php echo date('d') ?>) days_select.options[days_select.options.length] = new Option(j, j, true); The default day is still 1 not the current day. What is even frustrating is that when I checked it on firebug the selected day is the current day... I am a total noob in programming that's why simple things like these are kinda hard for me to grasp. date_select.php <body onload="loadDays();"> <script type="text/javascript" > function loadDays() { var year = parseInt(document.getElementById('years').value); var month = document.getElementById('months').value; var months = new Array [Code].....
Posted: May 5 at 2:29
View 2 Replies!
View Related
Location?
I want to use 'location' to redirect to link to another page: <?php header("Location: http://localhost"); ?> works fine, but when i introduce start_session, all i get is a blank page: <?php session_start(); header("Location: http://localhost"); ?> Can anyone give me a hint, do I need to change my php.ini-file or something like that?? I use apache and php 4.3.1, local installed.
Posted: July 16th, 2005 10:36 PM
View 1 Replies!
View Related
Self Location....
Is there are way, so I can retrieve the filename being runned and/or its location? Currently it is C:InetpubwwwrootJOTIntranetmoduleshelloworld but that might change. I need to create some temporary files in the same catalog.
Posted: July 18th, 2006 02:35 PM
View 4 Replies!
View Related
Not Going To The Right Location
i have on folder called test. Within test there are two folders called problem and the other solution. At the moment i am in the solution folder and wish to go to the problem folder which has a file called index.php. Porblem is how to I write this. // doesn't work $test = ".index.php"; header("Location: $test");
Posted: 04-17-2007, 07:04 PM
View 1 Replies!
View Related
No Location
if ($Location='') { Â Â Â print "No location"; } else { Â Â Â print "Location available"; } Some users leave the Location-field empty (when submiting their detail.
Posted: April 09, 2007, 01:25:07 PM
View 11 Replies!
View Related
Location.href
I use the php application phpPGAdmin which allows me to manage my Postgres database. I noticed that the application, if you click on an option that is a href (which passes along variables with it), you are taken to the approriate 'page' but the address in the browser always says http://..../index.php, even though the 'page' displayed is from the main.php program. I noticed that at the start of the main.php they set location.href to:location.href = "index.php"; I was wondering if this might be done to hide the href string that is sent to invoke main.php. Seems like a good way to hide what you pass along if you are not invoking a window using hidden fields on a form.
Posted: September 23rd, 2002, 03:05 PM
View 2 Replies!
View Related
Alternate Location For Php.ini
Is there a way to set php.ini to the alternate location? I'm trying to use 2 version of PHP(php4 and php5), but php.ini is in the way. Anyone knows how to circumvent this issues? Perhaps there is an env variable we can set.
Posted: July 17th, 2005 12:55 AM
View 6 Replies!
View Related
Calling An FTP Location In PHP
This (im hoping) is an easy problem to solve! Quite simply, i have a HTML login form, where users can type their usernames and passwords for an FTP server of mine. The code im using is; <? //set variables for form values of previous page to make next code easier. $user = $_POST['user']; $pass = $_POST['pass']; $login = "Location: ftp://{$user}:{$pass}@12.34.5.67/"; header( "$login" ); ?> User and Pass are boxes on the form before hand, and all works fine- however, the page this opens is a list of files that are inside that ftp location- instead of a 'folder view' that you usually get with most modern versions of windows. You can easily get to the folder view by hitting refresh when the file list shows up, but this ideally isnt what i want. So is there another method of calling that page so that it goes straight to folder view? Maybe opening it up in another window would work, but how would i do that?
Posted: January 16th, 2006 12:15 AM
View 4 Replies!
View Related
Php.ini Location Question
I'm trying to set the PHP include path for a PHP class on my web host, but I don't have access to the root php.ini. My host allows me to have my own php.ini which applies to each directory it appears in but it seems I need to have a php.ini in each and every directory I want my include path to apply in. I would rather avoid having a php.ini in each directory, since it's a class I use all over my site (phpMailer - excellent multipart email class). Is there any way to make my php.ini in my webserver root apply to all sub-directories, or another way to achieve this (btw - I can't use ..htaccess) ?
Posted: July 17th, 2005 01:00 AM
View 1 Replies!
View Related
Header CSS Location
I've created header/footer files, and included them in all the pages of my website. My problem is that in the header file, I have link href="css/default.css" rel="stylesheet" type="text/css" which doesn't apply for each page, since I have some pages in folders for organizational issues. Is there a way to make that reference dynamic somehow? I don't even know if my thinking is correct. I've seen $_SERVER['DOCUMENT_ROOT'] been used, but tried it and received errors. I'm not sure if I set it up correctly.
Posted: November 19, 2007, 07:50:45 PM
View 5 Replies!
View Related
Header('location:$url);
i was just wondering if i made a a php page using header('location:$url); and i just want get a certain part or the page what says the solution is: blah. then store in a variable and then print it back out or do i have to use the file_get_contents but if i use file_get_contents i have to use 3 cookies
Posted: March 12, 2007, 11:12:55 PM
View 2 Replies!
View Related
Location Header
is it possible to send data via location header like so <?php $search = 'random'; $location = 'mysite.com/myfile.php?search='.$search; // mysite.com/myfile.php?search=random header('Location: $location'); ?>
Posted: November 08, 2007, 09:25:34 PM
View 1 Replies!
View Related
Location Problem
i have on folder called test. Within test there are two folders called problem and the other solution. At the moment i am in the solution folder and wish to go to the problem folder which has a file called index.php. Porblem is how to I write this. // doesn't work $test = ".index.php"; header("Location: $test");
Posted: April 17, 2007, 06:07:38 PM
View 2 Replies!
View Related
|