|
Posted by McKirahan on 02/15/07 17:12
"McKirahan" <News@McKirahan.com> wrote in message
news:dO6dnRHVOfLPGknYnZ2dnUVZ_uy3nZ2d@comcast.com...
> 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.
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 (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
but got this error:
Parse error: parse error, unexpected '{' ...
It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").
Navigation:
[Reply to this message]
|