PHP functions not defined in command line -


it seems quite strange function defined when called web browsers, becomes undefined in command line mode.

for example,

<?php echo function_exists('mb_detect_encoding') ? 'yes' : 'no'; ?> 

when runs in browsers, prints "yes" means function defined.

but when run piece of code in command line, prints "no"

why? settings did miss in command line mode?

on linux should check /etc/php5/cli/conf.d se if enabled. otherwise try copying enviroment eg /etc/php5/apache2/conf.d


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -