View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
One way to achieve what you want is to add a SET PATH command in fw_enter.prg:
SET PATH TO ("d:\data\")
If all your tables are in the same database, the you can use the OPEN DATABASE command instead.  Once your database is opened, FoxPro will locate its tables, even if they are not within the search path.
Regarding the inconsistency between REMOTE_ADDR and REMOTE_ADDRESS, it is just a typo.  The correct server variable name is REMOTE_ADDR.  I just ran a search and found an instance of REMOTE_ADDRESS in the Global Procedures chapter.  Did you see it anywhere else?  We will be correcting our documentation shortly.

FoxWeb Support Team email

Sent by Agus on 02/13/2005 08:18:23 PM:
Thanks for the reply.  But I have other related question.
If we use command like 'use d:\data\xxx...' or 'select * from d:\data\xxx....'
I'm afraid that we need to change all the scripts when we move the data to other folder.
How to force foxweb to know the default directory data (not default fwx directory, not default script directory).  Or there is another way ?
I see not consistent word in your documentation
'Request.ServerVariables("REMOTE_ADDR") AND
in Global procedure and Processing user input.
Sent by FoxWeb Support on 02/03/2005 05:26:46 PM:
FoxWeb scripts work just like any other VFP program when it comes to locating data  and other support files.  If you want you  can store data files in the same folder as scripts, but you can also store them in a subfolder, or in a different folder altogether.  All you need to do is specify the correct path when you open a data file:

USE d:\data\users.dbf


SELECT * FROM d:\data\users.dbf

In general we don't recommend that you locate your fwx scripts in a web accessible folder, unless you:
a) Store data in a different non-web-accessible folder, and,
b) Really know how to protect your fwx and fxp files from being downloaded.

The Securing Your Web Server topic in the FoxWeb documentation deals with this topic.

FoxWeb Support Team email

Sent by Agus on 02/02/2005 06:05:20 PM:
I 've just know about FoxWeb from and have read
the documentation. 
I have some questions, please help.
 How to split the .fwx script and data folder to different folder ?
   Because too many files if the fwx and data folder in same directory.
   In case the data is used too by the exe program and do not want
   to use web directory in c:\inetpub\wwwroot.