Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2002, 05:37 AM
Vinney Vinney is offline
 
Join Date: Nov 2001
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default whats the difference in these ??

PHP Code:
if (!isset($mainfile)) { include("mainfile.php"); }
global  $Pmenu,$breadcrumb; 
and

PHP Code:
include ("mainfile.php"); 
global  $Pmenu,$breadcrumb; 
whats is the purpose of having the different methods ?
Reply With Quote
  #2  
Old 08-13-2002, 05:55 PM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well the top one is just saying if $mainfile equals something, dont mess with it, but if it isn't set then make it equal something,
PHP Code:
if (!isset($mainfile)) 
is just like saying "if $mainfile isn't set"
Reply With Quote
  #3  
Old 08-18-2002, 08:13 PM
Ajay Ajay is offline
 
Join Date: Nov 2001
Location: Chicago
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
if (!isset($mainfile)) 
[/QUOTE]
if the '$mainfile' variable is set, then include mainfile.php

PHP Code:
include ("mainfile.php"); 
this just includes the mainfile.php and doesnt check if the '$mainfile' variable is set
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:52 PM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.