|
-
Apr 28th, 2002, 04:10 PM
#1
Thread Starter
Fanatic Member
include()
if i had
PHP Code:
if(strlen($something)==0){
//login code
}
if(strlen($something)==0){
include("login.inc.php");
}
with the first one, the code is already there...does the include add the code in when it comes across it? my files are like 25kb now, postly php, and there are huge if/else clauses, i wanna see if i can do includes to reduce the download size...like you know what i mean?
itll only download whats needed, not the whole thing
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Apr 28th, 2002, 05:56 PM
#2
PowerPoster
the php file that you specify in the include function will be "included" where the statement is found, so yes
PHP Code:
if(strlen($something)==0){
include("login.inc.php");
}
would be fine
-
Apr 28th, 2002, 06:47 PM
#3
Thread Starter
Fanatic Member
ok thanks
but would it really matter since its parsed server side? or would it take less cpu?
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Apr 28th, 2002, 07:11 PM
#4
PowerPoster
the only real advantage is that it is less messy and a lot easier for you to work with.
It might save some processing time if you are only including 1 vast section rather than a lot of vast sections in the same file.
-
Apr 28th, 2002, 07:19 PM
#5
Thread Starter
Fanatic Member
ok its about 20 lines so ill just leave it then.
thanks
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Apr 28th, 2002, 07:29 PM
#6
PowerPoster
I'd do it for 20 lines
-
Apr 28th, 2002, 07:48 PM
#7
Thread Starter
Fanatic Member
ah otay then
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|