Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in PHP only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
PHP
command line or not???
Collapse
This topic is closed.
X
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Adam Dyga
#1
command line or not???
Jul 17 '05, 01:24 AM
Hello,
What's the best way to check whether script is run from command line or by
web server?
--
Greets
adeon
Pedro Graca
#2
Jul 17 '05, 01:24 AM
Re: command line or not???
Adam Dyga wrote:[color=blue]
> What's the best way to check whether script is run from command line or by
> web server?[/color]
I'd use php_sapi_name()
PHP: php_sapi_name - Manual
http://www.php.net/php_sapi_name
Returns the type of interface between web server and PHP
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment