Hello,
I have a web page which people can post their messages on it. Now for some reasons, the script has errors, and it cannot open stream... Here is the error message:
Warning: fopen(data/) [function.fopen]: failed to open stream: Is a directory in /homepages/33/d138037059/htdocs/wish/show.php on line 21
Warning: flock() expects parameter 1 to be resource, boolean given in /homepages/33/d138037059/htdocs/wish/show.php on line 22
Warning: fclose(): supplied argument is not a valid stream resource in /homepages/33/d138037059/htdocs/wish/show.php on line 24
...
Here is the URL: http://www.uswebcity.com/wish/show.p...ber=1237725546 (errors)
Here is the web page: http://www.uswebcity.com/wish/
The script did work fine before last month and I have not made any changes. I know the script(s) has no errors, and it will not cause any errors because today I did try the same(identical) scripts at other website that host by StartLogic.com host company, and the script works fine there. So the errors which are at my web site may cause by my current host company's server settings or some php configurations.
Could you please help me to fix(change) the script? So it will work fine with (both) my current host company(oneandone.com).
Here is part of the script that the errors refer to:
PHP Code:
<?
include "config.inc";
$f=file("data/$number");
for($i=0; $i<count($f); $i++){
if($i== 8)$f[$i]=$f[$i]+1;
$message=$message.$f[$i];
$ff=explode("\n",$f[$i]);
$f[$i]=$ff[0];
}
$fp=fopen("data/$number","w"); ### Line # 21
flock($fp,3);
fwrite($fp,$message);
fclose($fp);
?>
Thanks.
Andy
__________________
Make A New Website --- USWebCity.com
>> Web Hosting Ratings and Reviews <<
Bookmarks