I need help again please...

Discuss all aspects of programming here.

Moderator: The Mod Squad

I need help again please...

Postby Toby B. » Sun Jul 03, 2005 10:39 pm

more php coding stuff.........

I am trying a few different things (one of them being a homemade "workaround" for something I could not figure out myself)....

Project 1 - I am wanting to use one .txt file and have all the variables listed on the .txt file and have it "parsed" so that it functions like a include file... Too vague?

I tried figuring it out but cannot figure out how to get a .txt file read so that the variables get found/read...
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby Toby B. » Mon Jul 04, 2005 12:14 pm

Using this format:
Code: Select all
include ('includes/data.txt');


does not parse properly. It just prints the data from the txt file in the top of the page instead of plugging the data into the proper location(s). :?
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Wed Jul 13, 2005 10:06 am

this is really hard to troubleshoot with info provided.

first thing I can think of is that you are not turning php parser on in the page.

<?php


?>

Second thing is that it is better to name the page .php instead of txt. Kind of a php coding standard to do so.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Wed Jul 13, 2005 10:51 am

MoboCop wrote:this is really hard to troubleshoot with info provided.

first thing I can think of is that you are not turning php parser on in the page.

<?php


?>

Second thing is that it is better to name the page .php instead of txt. Kind of a php coding standard to do so.
ahh, ok... BTW the other thread in here has all the gruesome code that involves the "workaround" that I mangaged to do. Not everything is working as it should (hence the PM's I have been sending). Will take a peek at the references you provided and see what I can come up with... :wink:
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest