473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

noob...content via fread keeps reverting

This is my first day tinkering with php. I lifted a bunch of examples
from the php.net manuals and put this together:
http://abate.veritynet.net/~ddrguy/store.php

It's extremely simple and just uses fread and fwrite's form elements
into 2 small text files. Feel free to "update" the values. My question
is, why is it, everytime I go back to the page, it shows the very first
values I had in there. I repeatedly change them, refresh, delete
browser cache files, close and reopen browser, and still, when I first
get there, it shows the very first values I had in there. If I refresh,
then it shows what it should be. The text files are indeed being
written to properly. So it really seems like more of a browser issue,
but maybe something can be done to prevent it, without telling my
visitors to refresh everytime they hit the page? TIA

Nov 22 '05 #1
2 1090
Something else just struck me. If, when I go there, the content is old,
and I hit refresh and get the newer, proper content, why wouldnt that
new version stick to my browser's cache then?

I can change the value from X to Y. leav adn come back and it still
says X. I refresh and it changes to Y. I click edit, I get X content
again. I refresh again and get Y. I dont change anything and just hit
save. I get taken back to the front page and its X content again!

What is going on here? I don't know the inner workings of browser
caching, but if a page says X at 1:00 and says Y at 1:30, shouldnt the
browser consider Y to be the newest content and cache that?

Nov 22 '05 #2
Well ok, nevermind. my friends say it works ok for them. must be the
crappy IE config over here

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Luc Holland | last post by:
Hey, I'm working on a program that reads a binary file. It's opened with ==== if ((f1=fopen(argv,"rb"))==NULL) { fprintf(stderr,"Error opening %s for reading . . .\n",argv); exit(2); } ====...
2
by: Josh Wilson | last post by:
The fread() is what I believe is having trouble, but I do not know why. I know that the temp file is created and written to (and w/ the appropriate amount of data). fread() continues to return 0,...
13
by: 010 010 | last post by:
I found this very odd and maybe someone can explain it to me. I was using fread to scan through a binary file and pull bytes out. In the middle of a while loop, for no reason that i could...
5
by: David Mathog | last post by:
When reading a binary input stream with fread() one can read N bytes in two ways : count=fread(buffer,1,N,fin); /* N bytes at a time */ or count=fread(buffer,N,1,fin); /* 1 buffer at a...
20
by: ericunfuk | last post by:
If fseek() always clears EOF, is there a way for me to fread() from an offset of a file and still be able to detect EOF?i.e. withouting using fseek(). I also need to seek to an offset in the file...
8
by: xhunter | last post by:
Hi, I am trying to add support for ranges to my download scripts, so users downloading from my site with eg download managers they have the option for multiple connections/resume. I have gone...
3
by: sarika | last post by:
i have one php file having content Contents of ex1.php file <body> <?php $content = "c://webserver/www/abc.php"; $handle = fopen($content, "r"); echo fread($handle,filesize($content)); ?>...
8
by: Bob Bedford | last post by:
Hi all, I've to read and parse an XML file to save the datas in a database. Unfortunately it appens that the datas are wrong. I mean it seems they are not well readed...sometimes only part of...
1
by: Fluffy654 | last post by:
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.