View previous topic :: View next topic � |
Author |
Message |
beyonder Webmaster
Joined: 20 May 2002 Posts: 678 Location: my house.
|
Posted: Sat Nov 30, 2002 3:28 pm�� �Post subject: |
|
|
in order to edit the file on the server you need to run a servlet b/c normal users simply wont have right access to the driectory in question.....in order to run a servlet the server needs to kno what to do with class files, or at the very least have j2re installed...if normal clients had the access necessary to open a file on the server, write to said file on server, and then proceed to close said file on server i wouldnt have much control over what was on my site, now would i? you can HTTP POST the variable up to the server but you need a servlet or other script in order to tell the server what to do w/ the variable...if you could have the counter query a mySQL database i could set up an account on the db server that you could use for that which is much simpler than setting up the server to run servlets...and using a client side script to write to server side files simply isnt efficient in the first place...
Code: |
<?php
$counter_file = "icancount.dat";
if(!($fp = fopen($counter_file , "r"))) die ("file no go open. hah.");
$counter = (int)fread($fp, 24);
fclose($fp);
$counter++;
$fp = fopen($counter_file , "w");
fwrite($fp, $counter);
fclose($fp);
?>
<?php
for ($i = 0 ;$i < strlen($counter) ; $i++)
{
$imgsrc = SubStr($counter,$i ,1);
echo "<img src =\"images/" . $imgsrc . ".GIF\" width=\"30\" height=\"40\">";
}
?>
| this server passes htm, html and php documents thro the php processor so if u put that code in an html file and have the file "icancount.dat" in the same directory it will embed pictures 0-9 from the images/ directory....it can do the counting b/c PHP is a server side script...btw this is the code for the counter in use on the main page.[/code] |
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
Posted: Sun Dec 01, 2002 7:50 am�� �Post subject: |
|
|
So I could basically just copy that into a page, make minor adjustments (ie: change icancount.dat to a different filename) and it would work? Or not?
Databases and stuff in that vein, I haven't done yet. So the stuff you were saying about mySQL et al went right over my head... _________________ ~Twilkitri~
http://darktwilkitri.thegreatbeyond.net/ (is broken) |
|
Back to top |
|
|
beyonder Webmaster
Joined: 20 May 2002 Posts: 678 Location: my house.
|
Posted: Mon Dec 02, 2002 2:56 am�� �Post subject: |
|
|
you dont need to change icancount.dat since the working directory for your scripts is different from the working directory for the scipts on the main page....all u have to do is make the file icancount.dat in the same directory with the page this will be used on....icancount.dat simply stores a number...you also need an images directory w/ 1.gif,2.gif,etc. in it...to make the file just make a blank text document and save it, then upload it via ftp |
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
Posted: Mon Dec 02, 2002 8:11 am�� �Post subject: |
|
|
>< I'm not _that_ uninformed, beyonder. I didn't mean change the name to differentiate it from the one on the main page... _________________ ~Twilkitri~
http://darktwilkitri.thegreatbeyond.net/ (is broken) |
|
Back to top |
|
|
beyonder Webmaster
Joined: 20 May 2002 Posts: 678 Location: my house.
|
Posted: Mon Dec 02, 2002 9:34 pm�� �Post subject: |
|
|
meh...i could config the php to run in the same directory if i wanted to cause problems..... |
|
Back to top |
|
|
Pez-Man Pez-Man
Joined: 18 May 2002 Posts: 3443
|
Posted: Tue Dec 03, 2002 7:23 am�� �Post subject: |
|
|
Maaaaaaaaaaaan, I have NO idea what they're talking about. |
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
Posted: Wed Dec 04, 2002 7:36 am�� �Post subject: |
|
|
Got a new comic mostly done, just gotta put the words in.
I normally try to get them finished in one sitting, but I got interupted and haven't had a chance to finish it. I should put it up tomorrow. _________________ ~Twilkitri~
http://darktwilkitri.thegreatbeyond.net/ (is broken) |
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
Posted: Thu Dec 05, 2002 7:40 am�� �Post subject: |
|
|
So~
I got the comic done, it's up, got another one done too.
So 45 & 46 are now up. Amazing I actually got 2 done in two days...
Care to guess who's going to be next? _________________ ~Twilkitri~
http://darktwilkitri.thegreatbeyond.net/ (is broken) |
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
Posted: Fri Dec 13, 2002 7:16 am�� �Post subject: |
|
|
<.<
>.>
I applaud the guessing skills of the board.
No.s 53 and 54 are up.
And I've started work on a Java comic-viewer-thingy...
And, NO, beyonder, it doesn't need to write anything to here. It does need to read stuff from here, but I'm pretty sure I've got it figured out how to do that.
You'll probably have to download the Java2 plugin to use it, though. I could use AWT instead of Swing so you don't have to, but... meh. I like Swing better. _________________ ~Twilkitri~
http://darktwilkitri.thegreatbeyond.net/ (is broken) |
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
Posted: Tue Dec 24, 2002 7:17 am�� �Post subject: |
|
|
Um... oops. I've been forgetting to post my updates :/
60 is the newest one. _________________ ~Twilkitri~
http://darktwilkitri.thegreatbeyond.net/ (is broken) |
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
|
Back to top |
|
|
Twilkitri Pez-Ruler
Joined: 19 May 2002 Posts: 1481 Location: Australia
|
Posted: Fri Jan 03, 2003 8:23 am�� �Post subject: |
|
|
#62 is up. Yay for me.
<I'm going to continue this until someone comments> _________________ ~Twilkitri~
http://darktwilkitri.thegreatbeyond.net/ (is broken) |
|
Back to top |
|
|
|