Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 3 of 7 FirstFirst 1 2 3 4 5 ... LastLast
Results 21 to 30 of 63
  1. #21
    Member inthezone's Avatar
    Join Date
    Sep 2002
    Posts
    59
    Member #
    192
    Originally posted by filburt1
    Try this:
    PHP Code:
    eval(implode("\n"file('[i]filename.txt[/i]'))); 
    When I put that code in, it just displays that source in the browser, and if I put it between <?php ?> tags, it doesn't display on the browser but displays in the source (in a <?php code ?> format). Are you sure that's correct?
    The Extent of my PHP Knowledge:

    <?php
    print "In the Zone";
    ?>

  2.  

  3. #22
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    22 times
    Nope, I'm not

    The only real solution is to give the file a .php extension so the parser will parse it.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #23
    Member inthezone's Avatar
    Join Date
    Sep 2002
    Posts
    59
    Member #
    192
    Originally posted by filburt1
    Nope, I'm not

    The only real solution is to give the file a .php extension so the parser will parse it.
    Should the code you gave me be placed between <?php ?> tags?
    The Extent of my PHP Knowledge:

    <?php
    print "In the Zone";
    ?>

  5. #24
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    22 times
    It's PHP code so yes...
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #25
    Member inthezone's Avatar
    Join Date
    Sep 2002
    Posts
    59
    Member #
    192
    Originally posted by filburt1
    It's PHP code so yes...
    It still doesn't work even if I'm trying to include a .php file. Here's a screenshot of what I'm trying to do via phpmyadmin:
    Attached Images Attached Images
    The Extent of my PHP Knowledge:

    <?php
    print "In the Zone";
    ?>

  7. #26
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    22 times
    Oh, that's what you're doing. I meant modify the script that gets the information from the database
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  8. #27
    Member inthezone's Avatar
    Join Date
    Sep 2002
    Posts
    59
    Member #
    192
    Originally posted by filburt1
    Oh, that's what you're doing. I meant modify the script that gets the information from the database
    To explain things a little more, I have a newsboard script which can only be displayed by including headlines.txt onto a page, and my pages have a header.php and footer.php, with the content in between those 2 stored in the database. I want to include headlines.txt within a page generated by the database.
    The Extent of my PHP Knowledge:

    <?php
    print "In the Zone";
    ?>

  9. #28
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    22 times
    The only way I can think of is put a key in the field (i.e., something like {filecontent}). Then do echo str_replace('{filecontent}', implode("\n", file('headlines.txt'), $fieldfromdatabase).
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  10. #29
    Member inthezone's Avatar
    Join Date
    Sep 2002
    Posts
    59
    Member #
    192
    Originally posted by filburt1
    The only way I can think of is put a key in the field (i.e., something like {filecontent}). Then do echo str_replace('{filecontent}', implode("\n", file('headlines.txt'), $fieldfromdatabase).
    That doesn't seem to work. :surprised Since I only need headlines.txt to be displayed on my default index page, perhaps there's some code with variables I could use so that it only shows up on the default index.php...
    The Extent of my PHP Knowledge:

    <?php
    print "In the Zone";
    ?>

  11. #30
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    22 times
    I'm out of ideas...anybody else?
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Page 3 of 7 FirstFirst 1 2 3 4 5 ... LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:07 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com