[Klone-users] RE: Current Path
Trung, Tran Minh
trungtm at hpt.vn
Wed Mar 5 23:41:30 EST 2008
Hi,
I have a file user.db in the folder "/home/username/klone2/webapp/www/".
If I set the path is "/home/username/klone2/webapp/www/user.txt", it
read OK. But if I use getcwd() function, the path will be "/user.db", it
read fail. So how can I get the path that I can read on different PC
(with different username in the path "/home/username/klone2/webapp/www/"
?
Thanks,
Tran Minh Trung | Developer
hptsoftware
+848 8 458 518 (p) | +8490 5 166 372 (m) | trungtm at hpt.vn
Pasteur Tower, 3rd fl, 139 Pasteur St., Dist. 3, HCMC, Vietnam |
www.hpt.vn
-----Original Message-----
From: klone-users-bounces at koanlogic.com
[mailto:klone-users-bounces at koanlogic.com] On Behalf Of
klone-users-request at koanlogic.com
Sent: Tuesday, March 04, 2008 12:00 AM
To: klone-users at koanlogic.com
Subject: Klone-users Digest, Vol 20, Issue 1
Send Klone-users mailing list submissions to
klone-users at koanlogic.com
To subscribe or unsubscribe via the World Wide Web, visit
http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
or, via email, send a message with subject or body 'help' to
klone-users-request at koanlogic.com
You can reach the person managing the list at
klone-users-owner at koanlogic.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Klone-users digest..."
Today's Topics:
1. Current Path (Trung, Tran Minh)
2. Re: Current Path (Stefano Barbato)
----------------------------------------------------------------------
Message: 1
Date: Mon, 3 Mar 2008 14:45:42 +0700
From: "Trung, Tran Minh" <trungtm at hpt.vn>
Subject: [Klone-users] Current Path
To: <klone-users at koanlogic.com>
Message-ID:
<A0287EF1AF0DA94F81CB8938E06EEC6C3504FD at hpt-exbe-srv.hptvietnam.corp>
Content-Type: text/plain; charset="us-ascii"
Hi everyone,
How can I get current path when running in KLone server !? What function
can do that?
Ex: I want to get the path: "/home/username/klone2/webapp/www/"
Thanks & Best Regards,
Tran Minh Trung
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://koanlogic.com/pipermail/klone-users/attachments/20080303/9db60f29
/attachment.html
------------------------------
Message: 2
Date: Mon, 3 Mar 2008 11:45:29 +0100
From: Stefano Barbato <barbato at koanlogic.com>
Subject: Re: [Klone-users] Current Path
To: Klone users <klone-users at koanlogic.com>
Message-ID: <13E13E34-7976-43A5-834B-EFD9E6AE6399 at koanlogic.com>
Content-Type: text/plain; charset=WINDOWS-1252; format=flowed;
delsp=yes
On 03/mar/08, at 08:45, Trung, Tran Minh wrote:
> Hi everyone,
>
> How can I get current path when running in KLone server !? What
> function can do that?
> Ex: I want to get the path: "/home/username/klone2/webapp/www/"
>
> Thanks & Best Regards,
>
> Tran Minh Trung
Hi,
you can retrieve the current path at runtime with getcwd() function.
If your code doesn't change the working directory (chdir() or similar)
getcwd() will return "/" i.e. by default KLone current directory is
the root dir.
bye,
s
------------------------------
_______________________________________________
Klone-users mailing list
Klone-users at koanlogic.com
http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
End of Klone-users Digest, Vol 20, Issue 1
******************************************
More information about the klone-users
mailing list