473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HOW to add new file extension(.phpt) in apache

gauravgmbhr
107 100+
hi
m working with PHP
and i wrote some Test cases for each of my function

i want to follow the notation
file name = name.php
test file = name.phpt

so i need to add new extension called Phpt into apache so that i can be parsed in the same way as Php

Can some one tell me how to add new file extension in apache
Mar 9 '07 #1
2 16577
Banfa
9,065 Expert Mod 8TB
There are 2 methods you can add

Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .phpt
  2.  
to the httpd.conf file or you could add

Expand|Select|Wrap|Line Numbers
  1. application/x-httpd-php phpt
  2.  
to mime.type or alter the application/x-httpd-php line that already exists to include phpt.


If you don't have access to the Apache configuration files I think (???) you can try adding

Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .phpt
  2.  
to the .htaccess file in the required directory of your site (or may be the root) but I am not 100% sure on that.
Mar 11 '07 #2
gauravgmbhr
107 100+
There are 2 methods you can add

Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .phpt
  2.  
to the httpd.conf file or you could add

Expand|Select|Wrap|Line Numbers
  1. application/x-httpd-php phpt
  2.  
to mime.type or alter the application/x-httpd-php line that already exists to include phpt.


If you don't have access to the Apache configuration files I think (???) you can try adding

Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .phpt
  2.  
to the .htaccess file in the required directory of your site (or may be the root) but I am not 100% sure on that.
THANX FOR UR VALUABLE HELP
Mar 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Terence | last post by:
A curious observation: I have my apache web server configured for the PHP apache module to parse files ending in the .php extension. nothing unusual about that, but I also noticed that if I...
6
by: Els | last post by:
If I use <? include "file.html"; ?> in the html of my document, do I _have_ to change the extension of that document to .php, or would it still work and be valid if I let it remain .html? --...
1
by: john | last post by:
I have an exe console app that i wrote, which works on custom data files. I'd like to give these data files a custom extension and somehow register that file extension with my exe, so all i have to...
1
by: Erik Cruz | last post by:
Hi. My application has a page where users can click on some links to download documents. When testing the page I noticed an strange behaviour. One of the links points to a .pps file. When I...
19
by: Badr.ALmuzini | last post by:
hi,there how can i make php file extension hidden in the URL somthing like this (http://mail.google.com/mail/?view) Regard....
4
by: Benjamin | last post by:
Hi, I'm running PHP as an Apache module. I've always wondered how you set Apache up to parse a file as PHP without a file extension. Do you use the AddType directive?
1
by: Just D. | last post by:
All, Who knows how can we make the IE open the file with some non-standard extension? I have a new file type, say .MOX, I corrected the association on my computer for this file extension,...
2
by: dazzler | last post by:
I need to open PDF file with my python application, and I'm using os.startfile(filename.pdf) command, I would need open command act 100% like clicking the file in the windows explorer python...
29
by: lenbell | last post by:
It's old stupid and lazy here again I have been wanting to keep using my WYSIWYG (What You See Is What You Get - for my fellow stupids) html editor. But I was told that you HAD to rename your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...

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.