require_once



i've got a singleton browser class that parses $_SERVER['HTTP_USER_AGENT']
for things like the os, browser, etc. i have a header (head.php) script that
is required by most of the pages in my site. the problem in question is
this:

i have a page (my.docs.php) where users can view, edit, delete, share,
add/upload documents. the add/upload and share functionality is actually
another script (file.sharing.php) that is required once by my.docs.php when
that functionality is needed. and, if needed, my.docs.php will require_once
file.sharing.php and then call exit. both my.docs.php and file.sharing.php
require_once head.php. it appears that require_once isn't doing what i'd
expect it to do. head.php uses the browser class to determine if the browser
is a non-ie browser...if it is, then a message is shown telling the user
that ie is required in order to browse the site.

my.docs.php displays fine by itself and file.sharing.php shows fine by
itself, however when my.docs.php does the require_once file.sharing.php;
exit; i see the message displayed. if i print the browser object from within
head.php, i see two calls of the output. i also print
$_SERVER['HTTP_USER_AGENT'] to see what's being parsed. my first predicament
is the multiple output from what should have only appeared once. second is
the fact that $_SERVER['HTTP_USER_AGENT'] is completely blank the second
time around.

i know that's wordy but i hope it is understandable. any ideas are
appreciated.

tia,

me


.



Relevant Pages

  • Re: Why should I eschew prototype.js?
    ... relieves the developer of the effort of considering browser quirks ... The code required to perform some common and repeated javascript ... commonly-used functionality so access to that functionality is shorter ...
    (comp.lang.javascript)
  • Re: OT - Re: Internet Explorer 7
    ... And encryption isn't one of those mechanisms. ... and Firefox doesn't display it in the same broken way that IE does. ... I'm focusing on functionality. ... broken browser and it renders as they expect there, ...
    (rec.collecting.coins)
  • RE: Doc collaboration, how to group-edit a document via only a bro
    ... entirely from within a browser. ... We tried the threaded discussion functionality. ... Simply using the Basic Page as the document template doesn’t accomplish the ... Should we not be trying to use MOSS 2007 for this? ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: single page apps, URL hash setting, bookmarking, & the back button.
    ... bookmarking of url's to return to a given page in a web site/app in a ... Your argument is that this functionality shouldn't even be required, ... ignore those browser problems and just not support those browsers. ... if it already works _with_ these hacks? ...
    (comp.lang.javascript)
  • Re: jQuery + IE8--told you so
    ... and it's complete rubbish that will blow up in our faces when Browser ... functionality on any website, so the worst thing that would happen is ... scripts that make use of jQuery, which mostly do some client-side form ... fool to implement progressive enhancement in this way. ...
    (comp.lang.javascript)