You are here: Re: Returning a "304 Not Modified" responce « PHP Programming Language « IT news, forums, messages
Re: Returning a "304 Not Modified" responce

Posted by Hermann on 12/17/06 20:31

The PHP code I use is the following:
--------------------------------------------------------------------------------------------------
<?
$file=$_SERVER['QUERY_STRING'] ;
$fullFilePath=$_SERVER['DOCUMENT_ROOT'].$file ;
$fileModifiedTime=filemtime($fullFilePath) ;

if($_SERVER['HTTP_IF_MODIFIED_SINCE'])
{ $ifModifiedTime=strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'],0) ;
if($fileModifiedTime<=$ifModifiedTime)
{ header('HTTP/1.1 304 Not Modified') ;
exit ;
}
}
--------------------------------------------------------------------------------------------------

There is no closing php tag "?>", meaning that not a single byte is
sent to the client.
So I really dont know why are those few bytes being sent after the
headers.
They are just trash, just senseless 1s and 0s. They are always the same
4 bytes.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация