www.webdeveloper.com
Results 1 to 6 of 6

Thread: file paths

  1. #1
    Join Date
    Feb 2003
    Posts
    20

    file paths

    Ok, in my small bit of trining in perl scripts, I have failed to discover how I can create and open files in a different path than the directory the script is in. I need this because I want to create html pages witha cgi script and save them to my documents directory f my server. This should be simple to do, but I don't know how, and it will be very helpful.

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    You need to make sure that the directories are read/writeable. ie. CHMOD the directories so the script can write to them.

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  3. #3
    Join Date
    Feb 2003
    Posts
    20

    then what

    ok, but then how do I reference a different directory is it the "../" to move up the directory structure?

  4. #4
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    is it the "../" to move up the directory structure
    It probably would have been quicker to simply test it yourself than wait for an answer here.

    But the answer is yes.
    Code:
    open FH, '../file' or die $!;
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  5. #5
    Join Date
    Feb 2003
    Posts
    20

    not related, but I don't want to start a new thread

    Alright my mission is to create a script that will generate a calendar based on data entered into a form. My next problem is how can I create a page that can create a new form for each month. Is there a time function that would let me determine what month it is? Or would it be better to just begin with one calendar and from there define all the months.

  6. #6
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    Is there a time function that would let me determine what month it is?
    http://www.perldoc.com/perl5.8.0/pod/func/gmtime.html
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles