Hi All,

I have a little function that needs to delete some files.  I don't want it to 
delete them from the directory of my user, but in the directory of the script.

For example from terminal:

cd $HOME
php /path/to/script/foo.php  // will execute foo in home

But I want it to execute foo in /script.

So in the function I told it to change working directory to script path.

chdir(dirname(__FILE__));

Am I missing something or is this OK?  Is it evil to do such a thing?

Thanks,
Eric Chadbourne
_______________________________________________
Discuss mailing list
[email protected]
http://lists.blu.org/mailman/listinfo/discuss

Reply via email to