Results 1 to 10 of 10
  1. #1
    Newbie
    Join Date
    August 19th, 2008
    Posts
    6
    Php code problem
    When I include the php code on my site SteelerManiacs I get a black page. I went to the faq section and found that my problem might be due to the include() functions being disabled on your website. The faq section has a link to a php manual and I am unable to figure out what extra code to add to get my feed to display. Any help would be appreciated.

  2. #2
    Moderator BurgerBoy's Avatar
    Join Date
    January 18th, 2005
    Location
    jacked by sylon www.sylonddos.weebly.com
    Posts
    9,618
    Are you adding the php code to htm or html pages?

    Vietnam Veteran 1966-1970 USASA
    ABW Forum Rules - Advertise At ABW

  3. #3
    Newbie
    Join Date
    August 19th, 2008
    Posts
    6
    Im adding it to an html page

  4. #4
    Newbie
    Join Date
    August 19th, 2008
    Posts
    6
    I meant to write a "blank" page, not a "black" page

  5. #5
    notary sojac Herb ԿԬ's Avatar
    Join Date
    January 18th, 2005
    Location
    Central/Western NY State
    Posts
    7,741
    Lightbulb
    I had a problem when I first tried the GC php version, but allow_url_fopen
    was turned off on my servers. I had to use curl to do the job.

    turning allow_url_fopen "on" may cause some security issues but it is necessary for the GC php code to work.

    I say this not knowing if it is a match to your problem. I had errors showing for several lines on a page then.

  6. #6
    Moderator BurgerBoy's Avatar
    Join Date
    January 18th, 2005
    Location
    jacked by sylon www.sylonddos.weebly.com
    Posts
    9,618
    You need to tell your server to read php in html pages.

    I'm assuming you have a Cpanel on your server.

    You need to go to your Cpanel and click on - file manager.

    Next click on the - public_html folder image.

    Scroll down the page and find the .htaccess file. Click on it's link - not the image to the left of the link.

    After you click on the .htaccess link you will see some links in the upper right hand side of the page. Clink on the - Edit File - link.

    Leave everything in your .htaccess file exactly like it already it - don't change anything that is already there.

    At the bottom of what is already there add:

    This is if you server uses php 4
    Code:
    AddHandler application/x-httpd-php .html
    If your server uses php 5
    Code:
    AddHandler application/x-httpd-php5 .html
    Scroll to the bottom of the page and click on save.

    Your php should now work in your html pages.

    In your browser window you will probably have to re-fresh the page for it to show up.

    Vietnam Veteran 1966-1970 USASA
    ABW Forum Rules - Advertise At ABW

  7. #7
    Moderator
    Join Date
    April 6th, 2006
    Posts
    2,689
    I wasn't able to use php include on one of my sites & changing the server setting wasn't an option (shared environment).

    Curl is the perfect working solution, you can find sample code if you google "curl php include" ... totally agree with Herb

  8. #8
    ABW Ambassador Bob Lawrence's Avatar
    Join Date
    July 2nd, 2007
    Posts
    1,090
    I also had problems with the include($url)
    and found that if I changed it to readFile($url), that I could get it to work also.

  9. #9
    Newbie
    Join Date
    August 19th, 2008
    Posts
    6
    Changing it to readfile worked like a charm! Thanks for all of the help. I do appreciate it!

  10. #10
    Newbie
    Join Date
    August 30th, 2008
    Posts
    1
    read method works
    Worked for me, too.

    Just wondering...anyone know if there are any problems using this PHP instead of the 'include'?

    Does it effect anything?

    Thanks

  11. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Problem with PHP code and quotes
    By hazlcha in forum WebMerge (Fourthworld.com)
    Replies: 5
    Last Post: August 21st, 2014, 06:17 PM
  2. Need PHP Code Checked
    By Core in forum Programming / Datafeeds / Tools
    Replies: 5
    Last Post: March 8th, 2007, 06:11 PM
  3. php code
    By tvcrazyman in forum GoldenCAN
    Replies: 4
    Last Post: January 19th, 2006, 05:22 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
  •