It is currently Thu Mar 28, 2024 8:22 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: New CGI programmer needing help
PostPosted: Mon Sep 05, 2005 4:52 am 
Noobie
Noobie

Joined: Sat Sep 03, 2005 9:13 pm
Posts: 2
I'm rather new to programming with CGI, and though I do use open source to get ideas, I like programming my own.

I have this problem when I wrote a script for a mini-messageboard for my website.

I have the following files in my subdomain directory:
main.cgi
main.htm
settings.pl
load.pl

Now the main.cgi file used to contain the lines
require "settings.pl";
require "load.pl";

The "load.pl" line was always returning an error as file not found in the error logs. The "settings.pl" line does successfully load. In the end I decided to just put all the .pl files into the main.cgi file to save myself the trouble.

Unfortunately I left that problem hanging. Later on as I was adding lines, I wrote:

open (HTMLFILE,"< main.htm") || die $!;

which returned a no file found error. I also tried

open (HTMLFILE,"main.htm") || die $!;
open (HTMLFILE,"./main.htm") || die $!;
open (HTMLFILE,"/home/www/marher4.goldeye.info/main.htm") || die $!;

all to no avail.

I decided to see if my folder was just incorrect so I tried

open (HTMLFILE,"+>> main.htm") || die $!;
print HTMLFILE "blah blah blah";

which did end up writing to the main.htm.

I'm confused... Is there something wrong with what I'm doing?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
100WebSpace © 2011