#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    1
    Rep Power
    0
    I am a recent asp convert and am having some difficulty figureing out how to use a config file to set my document defaults.

    I have a page called config.inc

    <?
    $pageBGColor = '#FFFFFF'
    $DefaultFontFace = 'Verdana'
    $DefaultFontColor = '#000000'
    ?>
    When I include this file I recieve a
    "Parse error: parse error in config.inc on line 5"
    But I have no idea what that means.
    Am i using the info vars right when i plug them in my webpage?

    <? Echo "<body bgcolor= $pageBGcolor text= $DefaultFontColor>" ?>

    Thanks for any help that is provided

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    79
    Rep Power
    15
    You need to put a ; after the second " in the line

    <? Echo "<body bgcolor= $pageBGcolor text= $DefaultFontColor>" ?>

    All (or at least most) php commands must end with a ;

    Reply if you still have problems

    Regards
    Basil
  4. #3
  5. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    Actually trantrum, you're close.

    You don't need a closing ; in one line scripts enclosed with <? ?>.

    However, ;s are needed in the config.inc file.

Similar Threads

  1. Pointer problem in opening a file
    By LAKI in forum C Programming
    Replies: 13
    Last Post: February 11th, 2004, 08:27 AM
  2. Pointer problems opening file *formatted*
    By LAKI in forum C Programming
    Replies: 4
    Last Post: February 11th, 2004, 06:06 AM
  3. Replies: 1
    Last Post: February 8th, 2004, 01:59 PM
  4. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 07:42 PM
  5. Zone dat file config
    By sk8er in forum DNS
    Replies: 1
    Last Post: February 4th, 2004, 05:51 PM

IMN logo majestic logo threadwatch logo seochat tools logo