| 
	
 | 
 Posted by steve on 06/15/71 11:30 
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
 
  
Navigation:
[Reply to this message] 
 |