Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 23, 2005, 12:49 pm
rate this thread
I am wondering what the best way to:
Include a file (html and/or text) into my
php application, that is not on the webserver, is.
For example, when the user visits the intranet site, if they
have a particular file on their c: drive, I want
to include it (without them having to upload it to the server)
on the page they are viewing...
Tight security is not of paramount concern.
thanks in advance!
Re: how to Include a file from the user's c: drive
First of all, using include on text/html files is
unnecessary. readfile() would work faster because it
would not look for PHP code to parse and execute.
Now to the actual question. In order to be included,
the file must be available to the Web server.
Theoretically, if all your machines (including the one
PHP runs on) are working under Windows, you can share
the directory where the target file is located and access
it like this:
Although, to be honest, I have no idea why something
like this may be necessary...