• Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Help!

PGN

I am now PGNFounder
  • 764
    Posts
    21
    Years
    For some reason, i try to phpinclude my left.inc [left nav. bar] but it won't work! Goto pokemongalaxy.t35.com
    ^that is what I use to test the pages...i wouldn't host the finished site on t35 :P
     
    Gah! I'm blind! X_x;

    Umm, anyway...@_@ Can you give us the code you're using now so we can try to fix it?
     
    <html>
    <head>
    <title>Pokemon Galaxy - The Ultimate Resource for Pokemon</title>
    </head>
    <body text="black" bgcolor="#FFFF00"
    <center><script type='text/javascript' src='/pop.js'></script><script type='text/javascript' src='/pop.js'></script><img src=" " alt="Pokemon Galaxy"></center><br>

    <?phpinclude(left.inc);?>
    <td width="60%" bgcolor="#FFFF00" valign="top">
    <font size=36><b><center>
    Header
    </center></b></font>
    <br>
    Text
    <br>
    </td>

    <font size=1>All Content is © 2004 PGN. All rights reserved</font><br>
    </html>
     
    ewwwwwwwwwwwwwwwwwwwwwwwwww. that site is way to plain... you need to do somethin aboot that.


    ~Imakuni?
    BOOTED OUT
     
    Imakuni?, I don't even have my content CREATED yet! I need to fix the ?phpinclude() problem!
     
    i see your prob...

    <?phpinclude .. change it to <?php include ('path/to/file.ext'); ?>
    note the space after php and the ' 's...
     
    And note the spaces, too. You have to be extra careful when coding stuff like that because one mistake will ruin it. x_x;
     
    oooo sorry. i thought that was the finisdhed site. sorry. i cant help you with includes...
     
    lol lightning.. i was editing my post as you replied ^_^
     
    *clicks* Hm... what exactly are you worried about? The header thing not there properly?
     
    if you click the drop-down called "Site" [the only one i made] then the word "Header" and "Text" goes down... that's the problem
     
    i get a 404 too... *kicks t35*
     
    Always remember that the <?php and ?> tags are there to tell the interpreter when PHP code is starting and ending

    include is a command. Thus it requires proper syntax.

    You could always put the <?php and ?> tags on their own lines, as in the following example. It just makes things easier.

    Code:
    <?php          // It's on its own line!
    
    echo "Count to ten:\n";
    
    for ($i=1; $i<=10; $i++){
    echo "$i ";
    } // end for
    
    ?>          // This has its own line, too!

    Edit: I realised you don't have to declare variable type for "i."
     
    Last edited:
    You don't need to put them on their own line though.

    PHP:
    <?php
    include("var.php");
    ?>

    Is the same thing as
    PHP:
    <?php include("var.php"); ?>

    PHP can all be written on one line, sometimes it's just easier to put it on multiple ones though.
     
    Yeah, i can back up JK's theory there. On my site the includes aren't in 1 line. There in Multiple lines.
     
    Well, if you're just using a quick php command, it's sometimes better to do it in one line.

    Like for instance, on my news page, I use a variable for the avatars in case I ever change the URL of it. Below is the code I use for it.

    PHP:
    <table border='3' width='100%' cellspacing='3' cellpadding='3'>
    <tr><td rowspan='2' align='center' width='110' height='110'><center><?php print"$avasatoshi"; ?></center></td>
    <td align='center' width='200'><font color='white'>May 21st</font></td></tr>
    <tr><td align='center' width='200'><font color='white'>Evil School</font></td></tr>
    <td colspan='2'><font color='white'>Too much going on with school... really sorry I haven't been updating more frequently... but tonight
    I'm gonna start to install some of the scripts... hopefully most don't require a mySQL database... >.>
    </font></td>
    </TABLE>
    <br><br>

    It just makes more sense there to put it on one line instead of three lines. =/
     
    The reason you're getting a 404 is because the link is wrong, take out the "www."

    edit: I edited his post. Now try the link.
     
    Now that you're not getting a 404, how do i fix the page?
     
    Back
    Top