Please help!

Discussion in 'PHP' started by WeedGrinch, Dec 22, 2007.

  1. #1
    Okay i run an SMF forum, and i added this line where the logo should be:

    include "http://gamefront.us/Themes/SullenMadness_RC2/ads.html";

    But my ads don't show up. No errors tho.

    So i tried

    echo "test";

    and it worked!

    but the ads wont showup. Please help.
     
    WeedGrinch, Dec 22, 2007 IP
  2. Gawk

    Gawk Peon

    Messages:
    427
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try: include("http://gamefront.us/Themes/SullenMadness_RC2/ads.html");

    If it doesn't work it is because URL fopen wrappers is not enabled in your PHP
     
    Gawk, Dec 22, 2007 IP
  3. WeedGrinch

    WeedGrinch Active Member

    Messages:
    1,236
    Likes Received:
    73
    Best Answers:
    0
    Trophy Points:
    90
    #3
    didnt work, i even tried echoing the code, and parsing the " in it.
     
    WeedGrinch, Dec 22, 2007 IP
  4. Gawk

    Gawk Peon

    Messages:
    427
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Have you checked fopen wrappers is enabled?
     
    Gawk, Dec 22, 2007 IP
  5. WeedGrinch

    WeedGrinch Active Member

    Messages:
    1,236
    Likes Received:
    73
    Best Answers:
    0
    Trophy Points:
    90
    #5
    lol that wouldn't make a difference.
     
    WeedGrinch, Dec 22, 2007 IP
  6. lfhost

    lfhost Peon

    Messages:
    232
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    why do you want to use a URL in the include when you are including from your own domain ?
    Either use the root path /home/cpanelusername/public_html/..... style, or take out the URL to leave the path in there i.e.
    include "./Themes/SullenMadness_RC2/ads.html";
    Code (markup):
    URL fopen wrappers being off, would cause the file not to show.
     
    lfhost, Dec 22, 2007 IP
  7. WeedGrinch

    WeedGrinch Active Member

    Messages:
    1,236
    Likes Received:
    73
    Best Answers:
    0
    Trophy Points:
    90
    #7
    tried it,

    i tried echoing it to! so fopen doesn't matter.
     
    WeedGrinch, Dec 23, 2007 IP
  8. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #8
    nico_swd, Dec 23, 2007 IP
  9. WeedGrinch

    WeedGrinch Active Member

    Messages:
    1,236
    Likes Received:
    73
    Best Answers:
    0
    Trophy Points:
    90
    #9
    no no no
    i did
    echo "code code code code";
    and i dont need fopen for that !
     
    WeedGrinch, Dec 23, 2007 IP
  10. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #10
    But for the include?

    EDIT:

    Perhaps I understood you wrong... the include without the http worked?
     
    nico_swd, Dec 23, 2007 IP
  11. WeedGrinch

    WeedGrinch Active Member

    Messages:
    1,236
    Likes Received:
    73
    Best Answers:
    0
    Trophy Points:
    90
    #11
    i tried it without the http and with the http and it didn't work.
    i tried echoing the peice of code and it didn't work.
     
    WeedGrinch, Dec 23, 2007 IP
  12. lfhost

    lfhost Peon

    Messages:
    232
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #12
    why not just keep it simple and use an iframe or is it not allowed ?

    If you removed the http, you might have gotten the path wrong.

    Try using
    
    include(getenv('DOCUMENT_ROOT')."/Themes/SullenMadness_RC2/ads.html");
    
    Code (markup):
     
    lfhost, Dec 23, 2007 IP