Hi Tim,

> I'm a major newbie.

I was in the navy so never made it to major!?
I'm only going to comment on your syntax and ignore the
wide/Unix-related issues:

> $noting = "";
> $checkval = "<div style='color: #F00; font: bold 80px Georgia,
serif'>Hello
> World</div>";
> $filename = "thefile.inc";
>
> $fd = fopen ($filename, "w");
> $contents = fread ($fd, filesize ($filename));
> if ($contents == fread ($checkval)) {
    fwrite ($filename, $nothing);
...

$noting and $nothing
- typo?

if ($contents == $checkval ) {
- you don't want to read $checkval from the input file
- this comparison will be absolutely precise with no allowance for case
sensitivity, extra spaces, double instead of single quotes etc. Hope
that's ok with you!?

fwrite ($filename, $nothing);
- I've not tried this, but after reading to the end of the existing
contents will the 'new data' be added to the end of the existing
contents, or overwrite them? Please check.

Hope this gets you started,
=dn


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to