Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-21-2007, 03:05 AM   PM User | #1
bauhsoj
Regular Coder

 
Join Date: Jan 2005
Posts: 470
Thanks: 3
Thanked 0 Times in 0 Posts
bauhsoj is an unknown quantity at this point
Question Detect if script called from command line

How would I detect if a script is called from the command line and not the browser?
bauhsoj is offline   Reply With Quote
Old 07-21-2007, 10:34 AM   PM User | #2
GJay
Senior Coder

 
Join Date: Sep 2005
Posts: 1,791
Thanks: 5
Thanked 36 Times in 35 Posts
GJay is on a distinguished road
checking whether $argc and/or $argv aren't null would seem to do it.
__________________
My thoughts on some things: http://codemeetsmusic.com
And my scrapbook of cool things: http://gjones.tumblr.com
GJay is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 09:17 PM.


Advertisement
Log in to turn off these ads.