Här kommer ett gäng frågor ang ett script Count 'n Log 1.0.
Har bifogat alla orginal scriptfiler i zipfil.
Fråga 1:
Har lite svårt att fatta punkt 3 och 4 i readmefilen, finns det något enklare sätt att förklara "dos to unix" på?:
**********************************************
THIS SCRIPT WILL NOT WORK UNLESS YOU CHANGE IT TO UNIX FORMAT
because when you edit it, it adds hidden ^M to the end of each line and you
need to get rid of them. Here's how I do it.
**********************************************
1.) Change the script and then upload the three files by 'FTP.'
2.) 'Telnet' to your website and locate the directory where you are
storing the files, usually 'cd <filename>'. In my case, I keep them in the
directory called scripts, so i would type 'cd scripts'.
3.) Then I change the script from dos to unix by the command 'dos2unix count.cgi > count2.cgi'.
and hit enter.
4.) At the next prompt type 'mv count2.cgi > count.cgi' and enter. This moves the script from count2.cgi
back to the name count.cgi
5.) Then make it (chmod) by typing 'chmod 755 count.cgi' and then enter.
6.) The remaining two files only need to be 'chmod 766 counter.dat' and
and 'chmod 766 log.dat'.
Three of the four files enclosed need special read/write/excute properties:
count.cgi - chmod 755
log.dat - chmod 766
counter.dat - chmod 766
**********************************************
Sedan har jag lagt de 3 ovanstående filerna i min cgi-bin samt att jag i cgi-bin mappen har skapat en mapp kallad "data" enligt readmefilen.
Fråga 2:
*************************************
#This is the directory where your 'counter.dat' and 'log.dat'
#files will be kept. For instance, this counter is found on
#the page 'http://www.aestheticsurgerycenter.com/script/index.shtml'.#You MUST have the complete directory or else it won't work.
#If you don't know it, ask your service provider. This
#directory will only work at https://www.wideworldmart.com - so change it!
$directory = "/mnt/web/guide/aestheticsurgerycenter/";
**************************************
Ska jag bara skriva ($directory = "/cgi-bin/";) ? Eftersom det är där mina script ligger?
Fråga 3:
***************************************
Also, you need to add the following line to your '.html' page,
and change the extension from '.html' to '.shtml'.
<!--#exec cgi="http://www.yourdoamin.com/count.cgi"-->
-or-
<!--#exec cgi="/count.cgi"-->
***************************************
Här undrar jag var exakt lägger jag denna rad på min sida? I head eller bodyn? Jag såg att var jag än la den så var den hela tiden svagt gråmarkerad.
Fråga 4:
Kan jag bara ändra filändälse från htm-fil till shtml? Eller måsta jag ändra något mer i koden för att det ska bli en shtml-fil?
Min sida ligger på en Linuxserver (med bla php,cgi,ssi).
/Otto
:q