+ Reply to Thread
Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By descalzo

Thread: php error: <?PHP include('top/bottom.txt'); ?> doesnt work

  1. #1
    wfarr_0817 is offline x10Hosting Member wfarr_0817 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    5

    Angry php error: <?PHP include('top/bottom.txt'); ?> doesnt work

    help me please, the code in the title, i have had in my site for months, and i moved from my old server to x10hosting and it isnt working anymore.

    thanks,
    wfarr_0817

    ps: PHP must hate me, or im just stupid.

  2. #2
    khopcraft77 is offline x10Hosting Member khopcraft77 is an unknown quantity at this point
    Join Date
    May 2011
    Location
    Sooke, B.C.
    Posts
    80

    Re: php error: <?PHP include('top/bottom.txt'); ?> doesnt work

    I wouldn't be surprised if the problem lay in the top/bottom.txt. It is case sensitive, so for example if it is name Bottom.txt, a lower case b will not work. Also, make sure its extension is in fact txt.

  3. #3
    jaggi.yash74 is offline Banned jaggi.yash74 is an unknown quantity at this point
    Join Date
    Feb 2011
    Posts
    2

    Smile Re: php error: <?PHP include('top/bottom.txt'); ?> doesnt work

    i thought u must change the TXT file into PHP file

  4. #4
    Jonathan's Avatar
    Jonathan is offline x10Hosting Member Jonathan is an unknown quantity at this point
    Join Date
    Apr 2011
    Location
    Alabama
    Posts
    32

    Re: php error: <?PHP include('top/bottom.txt'); ?> doesnt work

    Including a .txt is fine. The include command doesn't care what file extension you use, it will simply pull the text out of the file and "paste" it where you have the command and will then be parsed accordingly.

    Are you getting back a PHP error message? If not check your error_log in cPanel and see if it has any entries relating to this.
    Jonathan

    Quote Originally Posted by Sharky View Post
    Personally, the thought of some guy shoving his todger up my poop chute doesn't appeal to me one bit. Nor does the opposite.

  5. #5
    wfarr_0817 is offline x10Hosting Member wfarr_0817 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    5

    Re: php error: <?PHP include('top/bottom.txt'); ?> doesnt work

    Quote Originally Posted by khopcraft77 View Post
    I wouldn't be surprised if the problem lay in the top/bottom.txt. It is case sensitive, so for example if it is name Bottom.txt, a lower case b will not work. Also, make sure its extension is in fact txt.
    i have the coding the right way. i kno that the include is just that picky but, i have it in the right cases. This is what the page looks like on:
    http://teheataofsoulz.net63.net/lyrics-month.htm<- on my old server
    http://teheataofsoulz.elementfx.com/lyrics-month.htm<- x10hosting server


    Quote Originally Posted by Jonathan View Post
    Including a .txt is fine. The include command doesn't care what file extension you use, it will simply pull the text out of the file and "paste" it where you have the command and will then be parsed accordingly.

    Are you getting back a PHP error message? If not check your error_log in cPanel and see if it has any entries relating to this.
    im not getting an error, its just that its not showing up the way i want it to, i have all the right coding.

    Quote Originally Posted by jaggi.yash74 View Post
    i thought u must change the TXT file into PHP file
    nope. you just leave it as a *.* (*=anything) and it should work with the page....

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: php error: <?PHP include('top/bottom.txt'); ?> doesnt work

    Change the .html file to .php. x10hosting servers do not parse .html files as PHP.
    Jonathan likes this.
    Nothing is always absolutely so.

  7. #7
    wfarr_0817 is offline x10Hosting Member wfarr_0817 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    5

    Re: php error: <?PHP include('top/bottom.txt'); ?> doesnt work

    Quote Originally Posted by descalzo View Post
    Change the .html file to .php. x10hosting servers do not parse .html files as PHP.
    Thanks descalzo. thats gunna save me alot of time.

+ Reply to Thread

Similar Threads

  1. include() does not work
    By zikozeb in forum Programming Help
    Replies: 15
    Last Post: 06-12-2011, 05:01 AM
  2. Replies: 1
    Last Post: 11-14-2010, 04:47 PM
  3. doesnt work
    By onlyonemaxdog84 in forum Free Hosting
    Replies: 1
    Last Post: 08-25-2010, 08:03 PM
  4. Help ftp doesnt work
    By shallira in forum Programming Help
    Replies: 1
    Last Post: 01-07-2008, 07:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers