+ Reply to Thread
Results 1 to 9 of 9

Thread: Could use some php include help here...

  1. #1
    Agenator is offline x10 Lieutenant Agenator is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    341

    Could use some php include help here...

    So I'm trying to use thirdchord for a band's website that I'm working on. The script works great but I cant seem to get the script to embed the track grid (third chord generates a unique track grid for each album which can be embedded in an html page). The embed uses and include statement as follows:
    PHP Code:
    <?php 
    $ID
    =1;
    include(
    "/home/mpband/public_html/thirdchord_0_8_4/trackGrid.php");
    ?>
    When i go to insert that into my download page (which is just an html file and an external style sheet). It doesn't show up. For that matter, if I try and echo something with php it doesn't show up either. So my question is, how do I get the php code to execute?

  2. #2
    t2t2t's Avatar
    t2t2t is offline x10 Elder t2t2t is an unknown quantity at this point
    Join Date
    Sep 2006
    Location
    Europe, Estonia
    Posts
    690

    Re: Could use some php include help here...

    Use relative paths, eg. If your file is under public_html:
    PHP Code:
    <?php 
    $ID
    =1;
    include(
    "thirdchord_0_8_4/trackGrid.php");
    ?>
    This post has been marked spam 52 times.


  3. #3
    Agenator is offline x10 Lieutenant Agenator is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    341

    Re: Could use some php include help here...

    tried and failed, It still doesn't show up (like I said, no php code will execute, even a simple echo command). Could it be that I didn't specify that php code would be included (other than the <?php tag) or could it be that i didn't specify a doc type?

  4. #4
    t2t2t's Avatar
    t2t2t is offline x10 Elder t2t2t is an unknown quantity at this point
    Join Date
    Sep 2006
    Location
    Europe, Estonia
    Posts
    690

    Re: Could use some php include help here...

    Well, the most obvious question would be is it a .php file? (just checking)
    Last edited by t2t2t; 01-01-2009 at 10:01 PM.
    This post has been marked spam 52 times.


  5. #5
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: Could use some php include help here...

    Quote Originally Posted by Agenator View Post
    (third chord generates a unique track grid for each album which can be embedded in an html page)
    to execute any PHP function it has to be *.php, to tell the server to start looking for the <?php tags and execute what's inside of them;otherwise it will just look at it as if it is a regular html file and not execute php

  6. #6
    Agenator is offline x10 Lieutenant Agenator is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    341

    Re: Could use some php include help here...

    to execute any PHP function it has to be *.php, to tell the server to start looking for the <?php tags and execute what's inside of them;otherwise it will just look at it as if it is a regular html file and not execute php
    And I suddenly realize how little i know about php
    Thanks alot to the both of you!

  7. #7
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: Could use some php include help here...

    Quote Originally Posted by Agenator View Post
    And I suddenly realize how little i know about php
    Thanks alot to the both of you!
    its ok, when I first started I thought like that too that I could execute php in html; but I quickly learned that none of my scripts were working

  8. #8
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Re: Could use some php include help here...

    Hehe, we all run it to stupid mistakes. Im sure some of you seen my first threads XD

  9. #9
    leafypiggy's Avatar
    leafypiggy is offline Community Advocate leafypiggy is on a distinguished road
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    2,228

    Re: Could use some php include help here...

    you can, in theory parse PHP in an html file, if you tell the server to do so via the .htaccess

    but, yeah. thats simpler. :D
    Neil Hanlon | x10Hosting Support Representative
    Neil[at]x10hosting.com
    █ I'm always happy to help. Just ask a question in Free Hosting
    Terms of Service IRC

+ Reply to Thread

Similar Threads

  1. PHP Include, file help!
    By stillDOLL in forum Programming Help
    Replies: 8
    Last Post: 10-07-2008, 04:26 AM
  2. PHP and new accounts
    By idani in forum Free Hosting
    Replies: 1
    Last Post: 09-21-2008, 01:49 PM
  3. include php within javascript
    By thezone1 in forum Programming Help
    Replies: 5
    Last Post: 04-24-2008, 12:50 PM
  4. php include is this possible
    By nahsorhseda in forum Programming Help
    Replies: 5
    Last Post: 12-28-2007, 12:09 PM
  5. Cambios IMPORTANTES en PHP.
    By Fedlerner in forum Noticias y Anuncios
    Replies: 1
    Last Post: 11-06-2007, 11:13 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