.php5与.php [英] .php5 versus .php

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

问题描述

我在两个环境中工作既没有配置

我可以改变;一个是我的网络托管另一个客户端。


我的网站主机需要使用.php5。扩展

使用PHP v5.1.4;其中.php用于PHP v4.3.11。

我的客户端支持带有.php的PHP v5.2.0。扩展。


有没有办法可靠地确定.php5是否为.php5。扩展

必须在服务器上使用?也许通过phpinfo()值?


我有一个页面使用v5函数file_put_contents()。

(我喜欢它的LOCK_EX功能。)


提前致谢。

I am working in two environments neither configuration of
which I can change; one''s my Web host the other a client.

My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.

Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?

I have a page that uses the v5 function "file_put_contents()".
(I like it''s LOCK_EX feature.)

Thanks in advance.

推荐答案

" McKirahan" < Ne ** @ McKirahan.com写信息

新闻:dO **************************** **@comcast.com。 ..
"McKirahan" <Ne**@McKirahan.comwrote in message
news:dO******************************@comcast.com. ..

我在两个环境中工作,既没有配置

我可以改变;一个是我的网络托管另一个客户端。


我的网站主机需要使用.php5。扩展

使用PHP v5.1.4;其中.php用于PHP v4.3.11。

我的客户端支持带有.php的PHP v5.2.0。扩展。


有没有办法可靠地确定.php5是否为.php5。扩展

必须在服务器上使用?也许通过phpinfo()值?


我有一个页面使用v5函数file_put_contents()。

(我喜欢它的LOCK_EX功能。)


提前致谢。
I am working in two environments neither configuration of
which I can change; one''s my Web host the other a client.

My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.

Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?

I have a page that uses the v5 function "file_put_contents()".
(I like it''s LOCK_EX feature.)

Thanks in advance.



我试过这个(不支持写入函数中的文件):


try {

file_put_contents(


I tried this (to not write to the file in the function isn''t supported):

try {
file_put_contents(


file,


text,FILE_APPEND + LOCK_EX);

} catch(异常
text, FILE_APPEND+LOCK_EX);
} catch (Exception


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

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