Re: calling php functions as library or cmd line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Geeze,

That was obnoxious.

Luckily google helped me out eventually:
if (basename($argv[0]) == basename(__FILE__)) {


Robert Cummings wrote:

> On Thu, 2005-01-13 at 09:46, Cere Davis wrote:
>> Does anyone know how to write php  libraries in a modular way so that you
>> can both test the libraries/functions on the command line with arguments
>> and/or use the php library as a part of your web code with
>> 'require_once()'
>> syntax?  Sort of like how Python or Ruby works?
> 
> Yes.
> 
> Cheers,
> Rob.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux