pathname of script in cli

All your question about php
Post Reply
chris
Site Admin
Posts: 194
Joined: Mon Jul 21, 2008 9:52 am

pathname of script in cli

Post by chris »

Hi,

I want to get the path of a php script I'm running in cli.

I tried __FILE__,
but it only gives the file name.
chris
Site Admin
Posts: 194
Joined: Mon Jul 21, 2008 9:52 am

Re: pathname of script in cli

Post by chris »

Oeps too fast

already found it: __DIR__

:D
Post Reply