I’m using the following code to open/create a new .htm file:
$file_handle = fopen($filename, “wb”);
$file_handle = fopen($filename, “xb”);
The rest of the script writes the content of the file correctly. There’s an include statement in the new .htm file that refers to a .css file. When I view the new .htm file, it is not formatted per the .css file. In the source, I find the include statement rather than the style tags from the .css. However, if I open the file for editing on the server and save it (without making any changes), the formatting is correct when opened again for viewing and the source shows the style tags instead of the include statement.
I’m going to try changing the include to the traditional “link” html statement for stylesheets, but I’m hoping to find a resolution to this for future use when I may not know of another alternative.