Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 10th, 2004, 05:39 PM
Authorized User
 
Join Date: May 2004
Location: Dhaka, , Bangladesh.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ruhin Send a message via AIM to ruhin Send a message via MSN to ruhin Send a message via Yahoo to ruhin
Default .htaccess file

What is the purpose of .htaccess file ? How to use this file
for that purpose ?
Reply With Quote
  #2 (permalink)  
Old June 10th, 2004, 05:50 PM
Authorized User
 
Join Date: Sep 2003
Location: Cambridge, , United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It has many purposes but its main purpose is to act as a basic password protection lock for a directory. There are many tutorials available on the net. The one I used was the one of the Apache website

HTH

---
David Thorne, Student
UK
Reply With Quote
  #3 (permalink)  
Old June 16th, 2004, 04:26 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

The .htaccess file may also be used to specify PHP ini configuration settings.

For example:
When the following is placed in a file called ".htaccess" the PHP scripts contained in the same directory as the ".htaccess" file will execute with the configuration changes specified in the file.

Code:
AddType application/x-httpd-php .html 

php_value register_globals 0
php_value error_reporting 0
php_flag expose_php off
php_value session.gc_probability 75
php_value arg_separator.output &
php_value arg_separator.input &;
.html files will be parsed by the PHP interpreter, register_globals will be turned off, error_reporting will be turned off.. etc.


Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
Reply With Quote
  #4 (permalink)  
Old June 23rd, 2004, 09:31 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

PHP & .htaccess get along very nicely with each other. You can actually check if some directives have been set by Apache with .htacess using PHP!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess mkgupta.mca MySQL 0 August 14th, 2006 03:03 AM
.htaccess problems vertmonkee Beginning PHP 0 March 8th, 2006 07:33 AM
.htaccess question cfemocha BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 October 5th, 2004 10:36 PM
.htaccess file in root folder hopenpray Beginning PHP 1 September 8th, 2003 02:39 PM
.htaccess percy PHP How-To 1 July 2nd, 2003 02:27 PM



All times are GMT -4. The time now is 03:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.