Previous Thread
Next Thread
Print Thread
Rate Thread
#101585 11/01/2000 5:00 PM
Joined: Aug 2000
Posts: 469
Member
Member
Offline
Joined: Aug 2000
Posts: 469
I'm trying to put together a script that opens a text file with some info in it (seperated by "|"'s), and prints out all that info.

Here is what I have so far, but it doesn't work. I don't have an error, but it just doesn't work. And if you're wondering, this is not how the whole thing is going to work, I just wanted to see if the opening/printing of the file would work.

Code
code:

As an end result, I'd like to rename all the review files with numbers, then have &intro list them all, only using titles inside the file instead (much like how forumdisplay works, I think). But for right now I'd be happy to see this simple thing work. Any suggestions?

------------------
-david
Choose your future.
www.antipopculture.org

Sponsored Links
#101586 11/01/2000 5:16 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
@reviewdata = split(/|/, @data);
$writer = $data[0];
$email = $data[1];
$creator = $data[2];
$title = $data[3];
$type = $data[4];
$review = $data[5];

you should be assigning those from $reviewdata[] not data.

At any rate, it's much better to just right

my ($write, $email, $creator, $title, $type, $review) = split(/|/, @data);


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#101587 11/01/2000 5:33 PM
Joined: Aug 2000
Posts: 469
Member
Member
Offline
Joined: Aug 2000
Posts: 469
well thats interesting. OK, I changed data to review data, and re-ran the script. I also renamed the file that is opened 000000.txt, but I don't think that has anything to do with...anything.

Anyway, I re-ran the script and the only thing it did different was print out "1" for $writer. Then, I changed the script using the code you provided, and this time it printed out "0" (thats a zero) for $writer. I'm purplexed.
http://www.antipopculture.org/reviews/review.cgi
------------------
-david
Choose your future.
www.antipopculture.org


This message has been edited by evil-empire on November 01, 2000 at 04:36 PM

#101588 11/01/2000 9:53 PM
Joined: Aug 2000
Posts: 469
Member
Member
Offline
Joined: Aug 2000
Posts: 469
OK, zanardi helped me with all those problems. Well, the functional ones. New problem though. When the script prints the $review variable, it only prints whats on the first line of the file. So, if I have:

Quote
quote:
as the review, only "Nsync are horrible, they suck so much." is printed.

suggestions?

------------------
-david
Choose your future.
www.antipopculture.org

#101589 11/02/2000 7:07 PM
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Is don't buy thier album! in a second line? If so, and you are trying to read line by line, the second line won't be read.

------------------
Da Wannabe Cannuck

:: Who is Andy?

Sponsored Links
#101590 11/02/2000 11:01 PM
Joined: Aug 2000
Posts: 469
Member
Member
Offline
Joined: Aug 2000
Posts: 469
yeah...thats what I was trying to say. Now how do I fix that problem? I need it to read off of multiple lines, since all of the reviews will have multiple paragraphs.

------------------
-david
www.antipopculture.org
Who's in bunker, who's in bunker?
Women and children first
Women and children first

#101591 11/03/2000 12:25 PM
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
Try replacing:

Code
code:

with this:

Code
code:


This message has been edited by Dave_L on November 03, 2000 at 11:50 AM


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)