|
-
Feb 7th, 2006, 01:17 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Stop PHP file executing
Can i do this? what would be the correct syntax?
If somthing
{
} else
{
exit do not execute anything more
}
Thankjs
-
Feb 7th, 2006, 02:44 PM
#2
Re: Stop PHP file executing
I'm not shure what you are asking, stop part of the code from executing or stopping the file from being processed at all?
Cheers,
Ryan Jones
-
Feb 7th, 2006, 02:46 PM
#3
Thread Starter
PowerPoster
Re: Stop PHP file executing
sorry say we have this.....
If this is true {
do this
}else{
stop execution of all the file below
}
more commands, on executed if above was true.
basicly and exit sub kind of thing
Thanks
-
Feb 7th, 2006, 02:51 PM
#4
Re: Stop PHP file executing
Ah, I understand now 
Something like this?
Code:
if ($Something)
{
echo 'Looks like you can continue then!';
}
else
{
echo 'Sorry you can go no further!';
exit(0);
}
# Anything down here will only execute if the above IF statement was true.
Cheers,
Ryan Jones
Last edited by sciguyryan; Feb 7th, 2006 at 02:55 PM.
-
Feb 7th, 2006, 02:54 PM
#5
Thread Starter
PowerPoster
Re: Stop PHP file executing
i knew it would be somthing simple. Thanks
-
Feb 7th, 2006, 02:56 PM
#6
Re: Stop PHP file executing
 Originally Posted by Pino
i knew it would be somthing simple. Thanks
PHP makes many things simple, when you know what the things are 
There is another called die(); that allows you to do the same thing.
Cheers,
Ryan Jones
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
|