Home » Htaccess Tools » Htaccess Questions  » How to find the full path to a file using PHP
How to find the full path to a file using PHP [message #201] Fri, 27 January 2006 10:44
andreas  is currently offline andreas
Messages: 240
Registered: January 2005
Location: Denmark

Site Admin
If you want to setup .htaccess authentication you need to enter the full path to the .htpasswd file. If you dont know the full path and PHP is installed on the server, you can get some help here.

Below is a small PHP script that prints the full path to the directory it is placed in. Copy the code and paste it into a file called fullpath.php. You can then upload the file to the directory where you want to place the .htpasswd. Then point your browser to http://www.your-domain.com/path/to/fullpath.php

<?php
echo dirname(__FILE__);
?>

[Updated on: Tue, 24 June 2008 12:47]

Previous Topic:Howto create a password for a .htpasswd file using PHP
Next Topic:Message bodies lost
Goto Forum:
  


Current Time: Sat Jul 5 13:03:47 CEST 2008

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software<\ /a>