Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: c vrs c++ mime

  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,368
    Thanks
    262
    Thanked 32 Times in 31 Posts

    c vrs c++ mime

    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

    PHP Code:

    text
    /x-ccharset=us-ascii 
    Array
    (
        [
    0] => text
        
    [1] => x-ccharset=us-ascii

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

    PHP Code:

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

    I save the file like this

    PHP Code:

    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?

  • #2
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,368
    Thanks
    262
    Thanked 32 Times in 31 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •