PDA

View Full Version : c vrs c++ mime



durangod
09-07-2011, 10:15 PM
in my bid to try to find out why one file displays differently than the other i did a mime output.

my index file which displays fine looks like this




text/x-c; charset=us-ascii
Array
(
[0] => text
[1] => x-c; charset=us-ascii
)



and the php file lets call it file1.php i have issues with looks like this




text/x-c++; charset=us-ascii
Array
(
[0] => text
[1] => x-c++; charset=us-ascii
)



I save the file like this




if ($mime['0'] == "text")
{
$dbf->query("SELECT datid FROM content WHERE datid = '$filehash' ");
if ($dbf->nf() == 0) //does not exist
{
$dbf->query("INSERT INTO content (datid, content) VALUES('$filehash','$contents') ");
}
$status = 'added';




I can run all kinds of php files thru this and they all work fine, but file1 explodes on the screen meaning i see the file content as well as my php/html content all mixed up on the screen.

Could it have something to do with the C++ in the mime type?

durangod
09-07-2011, 10:22 PM
nevermind hold on, i just found another c++ file and tested and worked fine, so there is obviously something up with this one file somehow. Ill get back to ya thanks.