When using php.ini with
auto_prepend_file=/homepages/xyz/htdocs/somefile.php
on the file thickbox.css (for some reasons I have to process css files as php), the first line gets deleted. The beginning of thickbox.css is
#TB_overlay {
background: #000;
opacity: 0.7;
filter: alpha(opacity=70);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 100050; /* Above DFW. */
}
but the output with a prepended file is
background: #000;
opacity: 0.7;
filter: alpha(opacity=70);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 100050; /* Above DFW. */
}
The first line is gone!
When I just place a blank before the # or a linebreak, the line reappear. But as soon as the first character is a # the first line is gone.
How can I prevent this?
I found the solution myself. The requested css-file should not just be appended. Instead the 'somefile.php' should output the requested file itself with the following lines at the end:
readfile($_SERVER['SCRIPT_FILENAME']); // the requested file
exit(0);