Yesterday you helped me to get out the darkness, but still shadow remains in my soul:
#!/usr/bin/perl
$number_of_digits = 6;
open (COUNTING, "< D:/StronyKlientow/cematsil.bptnet.pl/main/Alicja/pe
+rl/counter.txt")||die"can not open";
$count = <COUNTING>;
#chop ($count) if $count =~ /\n$/;
close (COUNTING);
$count ++;
print ("Content-type: text/html\n\n");
print "<HTML><BODY BGCOLOR=lightblue><TABLE ALIGN=center BORDER=0>\n\n
+";
print "<TR><TD ALIGN=Center VALIGN=top>\n\n";
@digits = split(//, $count);
$spline = '%0' . $number_of_digits . 'd';
$count = sprintf("$spline", $count);
@digitimages = split(//, $count);
foreach $digitimage (@digitimages) {
$image = "<img src=\"../obrazki/" . "$digitimage" . ".gif\" VSPACE=0>"
+;
print ("$image");
}
print "\n";
print "</TD></TR></TABLE>\n</BODY></HTML>\n\n";
open (COUNTING, ">D:/StronyKlientow/cematsil.bptnet.pl/main/Alicja/per
+l/counter.txt") or die "Cannot open: $!\n";
print COUNTING $count;
close COUNTING;
exit;
This program works perfectly on my PC, but uploaded to server refuse to write into file. On the server side I can open the file (counter.txt) for reading but I can not write to it (the counter do not increase). It is Apache server. Is there anything that I can do now? Maybe the server administrator should do somehing... (what?)
Regards, sOKOle
bow for hacker monk
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.