解析.cfm文件 [英] Parse .cfm files

查看:106
本文介绍了解析.cfm文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆扩展名为.cfm且带有PHP代码的文件。

这是一个很长的故事,但我需要保持扩展名相同。

有没有办法让PHP解析.cfm文件?

我的网站主持人说他们不能做到这一点。

我应该争辩?


马修

I have a bunch of files with the extension .cfm with PHP code in them.
It''s a long story, but I need to keep the extension the same.
Is there a way to make PHP parse the .cfm file?
My web host says they can''t do it on their end.
Should I argue?

Matthew

推荐答案

Matthew256写道:
Matthew256 wrote:

我有一堆扩展名为.cfm的文件,其中包含PHP代码。

这是一个很长的故事,但我需要保持扩展名相同。

有没有办法让PHP解析.cfm文件?

我的网站主持人说他们不能做到这一点。

我应该争辩吗?


马修
I have a bunch of files with the extension .cfm with PHP code in them.
It''s a long story, but I need to keep the extension the same.
Is there a way to make PHP parse the .cfm file?
My web host says they can''t do it on their end.
Should I argue?

Matthew



我不能说因为我责备他们。我不想尝试为每个客户端添加非标准的

扩展名。


如果这是Apache,他们可以使用AddType指令在

httpd.conf文件中。您可以在.htaccess文件中执行此操作。


但.cfm是一个Cold Fusion模板文件。为什么你会有PHP代码呢?


如果你将扩展名更改为

,那么从长远来看你会好得多。 .PHP。或者只是给自己一个虚拟的私人

服务器,你可以做任何你想做的事。


-

==== ==============

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================

I can''t say as I blame them. I wouldn''t want to try adding non-standard
extensions like this for every client.

If this is Apache, they could with an AddType directive in the
httpd.conf file. You could do it in the .htaccess file.

But .cfm is a Cold Fusion template file. Why would you have php code in it?

You''ll be much better off in the long run if you change the extension to
something standard like .php. Or just get yourself a virtual private
server where you can do anything you want.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


Matthew256写道:
Matthew256 wrote:

我有一堆文件扩展名为.cfm,其中包含PHP代码。

这是一个很长的故事,但我需要保持扩展名相同。

有没有办法让PHP解析.cfm文件?
I have a bunch of files with the extension .cfm with PHP code in them.
It''s a long story, but I need to keep the extension the same.
Is there a way to make PHP parse the .cfm file?



PHP并不关心扩展。


fopen(),fread()和fclose()来要记住。

如果.cfm是纯文本,我会使用file()代替。


-

我(几乎)从不检查躲闪的地址。

如果你真的*需要给我发邮件,请使用回复地址/ b $ b标题中的地址,并在*中留言plain * * text * * without * * attachments *。

PHP doesn''t care about extensions.

fopen(), fread(), and fclose() come to mind.
If the .cfm is plain text I''d use file() instead.

--
I (almost) never check the dodgeit address.
If you *really* need to mail me, use the address in the Reply-To
header with a message in *plain* *text* *without* *attachments*.


将以下行添加到目录中的.htaccess文件中(如果有

是一个,如果没有创建它)


AddType应用程序/ x-httpd-php .php .cfm #add任何其他扩展

你想要被解析

希望这会有所帮助,

--Joel

10月29日下午1:53,Matthew256 < PRESENT ... @ gmail.comwrote:
Add the following line to the .htaccess file in the directory (If there
is one, if not create it)

AddType application/x-httpd-php .php .cfm #add any other extentions
you want to be parsed
Hope this helps,
--Joel
On Oct 29, 1:53 pm, "Matthew256" <PRESENT...@gmail.comwrote:

我有一堆文件扩展名为.cfm,其中包含PHP代码。

这是一个很长的故事,但我需要保持扩展名相同。

有没有办法让PHP解析.cfm文件?

我的网站主持人说他们不能做到这一点。

我应该争辩吗?


马修
I have a bunch of files with the extension .cfm with PHP code in them.
It''s a long story, but I need to keep the extension the same.
Is there a way to make PHP parse the .cfm file?
My web host says they can''t do it on their end.
Should I argue?

Matthew


这篇关于解析.cfm文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆