Closed (fixed)
Project:
Drush
Version:
8.x-6.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2009 at 22:53 UTC
Updated:
1 Jul 2021 at 17:03 UTC
Jump to comment: Most recent
Comments
Comment #1
dman commentedAmong other things, the $_SERVER and $_REQUEST is going to look totally different. Is that a start?
print_r() it and you'll see something you can grab.
Comment #2
moshe weitzman commentedComment #4
traviscarden commentedThe Drupal 7 solution to this would be
drupal_is_cli(), which detects whether the current script is running in a command-line environment. (Nice.) Ex:Comment #5
cameron tod commentedTo make sure that your code is being run from the cli and drush, you can check for the existence of drush functions.
Drupal 7:
Drupal 6 (and probably 5):
Comment #6
traviscarden commentedComment #7
dpovshed commentedHere is an info for D8 for completeness: https://www.drupal.org/node/2295037
Comment #8
diamondseaD8:
(saved you a click)