English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I can use:
$file = "acb.txt";
if (file_exists($file)) {
$fp = fopen("$file", "r+");
$temp= fgets($fp, 4096);
$temp+= 9;
fseek($fp,0);
fputs($fp, $temp);
flock($fp, 3);
fclose($fp);
} else {
echo "Cannot open file - '\$file'
";
}
for read and write (ex: number) from abc.txt.
Can i do it by Javascript?Can you help me?Thanks

2006-08-23 08:22:30 · 3 answers · asked by duc l 3 in Computers & Internet Programming & Design

3 answers

Javascript itself isn't really designed to do this. However you can use Ajax to read a textfile, and also to call a server side app (your php file for example) that can write a textfile.

The best way to do this is to download an Ajax toolkit like the one Yahoo has or Dojo (http://www.dojotoolkit.org/ ). They will have instructions on how to build the requests.

2006-08-23 09:05:57 · answer #1 · answered by John J 6 · 0 0

If it's autobiographical and I know who the author is then I can tell if they are truly writing it, because it's as if they are speaking it. If it's biographical and I know the writer that's fine, if not then I imagine what they are like, voice, looks, personality. I have a mental picture of all characters in books, which is a strange thing when a movie of the book eventually comes out. As the actor they've chosen doesn't always match my imaginary character. Wouldn't it be a great job to be a casting person, being able to choose which actors for which part. If a book is descriptive enough then you don't have to imagine it all, only fill in the parts not described.

2016-03-27 02:41:32 · answer #2 · answered by Anonymous · 0 0

no-File I/O is not allowed with javascript.
you can look into an Applet, or ActiveX

2006-08-23 08:39:19 · answer #3 · answered by stratsandlespauls 6 · 0 0

fedest.com, questions and answers