CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
moving around the directory tree

 



minbari
Deleted

Sep 8, 2000, 3:49 AM

Post #1 of 2 (323 views)
moving around the directory tree Can't Post

I'm using the MIME::Entity.pm module and want to attach a file to it that is located in a different directory than the script.
the script is in the cgi-bin and if I put the file there it works, but ./online_order/
does now work.
The files are located in the folder online_order, which is in the same directory as the folder cgi-bin.
Unfortunately I alway get an error message in my error log, saying file:"./online_order/file.txt" not found at (location of the entity.pm) nodule line 145.
Please help!


fashimpaur
User / Moderator

Sep 8, 2000, 5:51 AM

Post #2 of 2 (323 views)
Re: moving around the directory tree [In reply to] Can't Post

Minbari,

I would try something like this:

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>



$top = build MIME::Entity (From => 'me@myhost.com',
To => 'you@yourhost.com',
Subject => "Photo of the Family",
Path => glob (./online_order/file.txt));

</pre><HR></BLOCKQUOTE>

Frown Had to fix code section. Nothing lined up.

In all the examples I have seen, it looks as
though the writers knew this would be used from a cgi-bin and based the path off the web root and not virtual with respect to where they are currently in the directory structure.

This is just a guess. If anyone has a more
definitive answer, I would like to hear it for my benefit as well.

HTH,

Dennis

[This message has been edited by fashimpaur (edited 09-08-2000).]

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives