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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    includes displaying html source code

    I'm running into a problem that is probably just a simple fix to some one who knows what they are doing, so any insight would be welcomed.

    I just moved a couple of sites from a server running Apache 1.3 with PHP 4.0.x installed to a server running Apache 2.0.2 with PHP 4.2.x installed.

    I'm finding on 2 of the sites that some PHP includes that were pulling content (with html formatting) into an html page are showing all the html source with the content. The PHP is running or it wouldn't pull the includes into the page at all, but it looks as if the page is rendering first, then putting in the PHP.

    Don't know if this makes sense or not, but here's an example...

    Before the page looked like this:

    Some copy
    PHP Include copy
    More copy

    Now it looks like this:

    Some copy
    <b>PHP</b> <a href="">Include copy</a>
    More copy


    The actual html inside the include is not being rendered.

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Welcome here.

    Maybe post the code that you use to include the file + the code inside that file.

    It should look like

    PHP Code:
    include('thefileadress.php'); 
    and then inside 'thefileadress.php'
    PHP Code:
    <?php
    echo ('<a href="www.foobar.com" title="Go to our main site">GO</a>'); 
    ?>

    or

    PHP Code:
    include('thefileadress.php');
    echo 
    $content
    and then inside 'thefileadress.php'
    PHP Code:
    <?php
    $content
    =('<a href="www.foobar.com" title="Go to our main site">GO</a>'); 
    ?>

    Or maybe even something else depending on your code. But i can't make anything up out of your example

  • #3
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I withdraw my question

    In getting the code to answer your replay it just dawned on me that the problem was in the info being pulled from the database. Then, I realized what I had done... I exported my db from server 1 as a .txt file, instead of a .sql file... then imported into server 2. Somewhere along the lines it converted all my html code to the character code equivalent.

    Sorry about that, but thanks for the help... you at least made me realize what I was doing
    Last edited by rptut; 01-23-2004 at 02:46 PM.


  •  

    Posting Permissions

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