[maybe minor ot] cache probs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i'm sorry _if_ this is ot...

i use php to communicate between flash and mysql...
in internet explorer (not in opera or fire fox, where eveything works ok) something goes wrong and flash recives old data that doesn't exist anymore...
the php page that loads the flash movie displays the correct updated info, but the php function (in another file) that gets called from flash displayes old info that doesn't exist anymore...
this is the php function that returns the wrong info:


<code>
function fetchImgUrl() {
global $link_id;
$question = "SELECT path, filename FROM img_tmp WHERE id = 'sortment'";
$result = mysql_query($question, $link_id);
if ($result) {
$img = mysql_fetch_object($result);
if (file_exists("./../img/sort/".$img->filename)) { $rtnVal = "&error=0&path=".$img->path."&file=".$img->filename; }
else { $rtnVal = "&error=3&arg=".htmlentities("The file ".$img->path.$img->filename." does not exist"); }
} else { $rtnVal = "&error=2"; }
return $rtnVal;
}
</code>


explaination of the code: the mysql table "img_tmp" never holds more than one row... this row allways have the id "sortment" (this is because if i decide to expand the functionality in the future).
if (file_exists("./../img/sort/".$img->filename)) { $rtnVal = "&error=0&path=".$img->path."&file=".$img->filename; }
Now this is really strange... flash recives this info: "&error=0&path=./../img/sort/path&file=<old file name that doesn't exist anymore>" this filename points to a file that doesn't exist on the server so why does the if-statement evaluate to true?!?


any ideas?


_bobo wieland _ dev@xxxxxxxxxxxxx _ winamp >> jeans team feat. mc lan | keine melodien

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux