473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

how to Include a file from the user's c: drive

Hello all,
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!

best regards,
John

Jul 17 '05 #1
3 1712
john wrote:
Hello all,
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...


Not possible unless they specifically upload it.

--
Oli

Jul 17 '05 #2
thanks, I did not think so...

Jul 17 '05 #3
NC
john wrote:

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.


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:

readfile('\\ClientMachine\SharedDirectory\file.txt ');

Although, to be honest, I have no idea why something
like this may be necessary...

Cheers,
NC

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jez | last post by:
I'm ashamed that I need to ask this question. I've been using PHP for almost a year now, and have used HTML extensively in the last few years. Often, when I create a new site, I use include() to...
3
by: Des Perado | last post by:
We have a DOS app running on a Novell server. We want to make information from the app visible in a web page on our intranet. We have a program in the DOS directory producing 4 include files...
6
by: moonriver | last post by:
I write a program accessing files in network drive o:. It is doable as a standalone application. However, if it is running under windows service, the following exception will appear: 13/07/2004...
8
by: Lam | last post by:
HI anyone knows how can I open a mapped network file in C#? I try string file = @"T:\file.txt"; it shows me the error: "Could not find a part of the path" but if I copy the file to my C dirve,...
2
by: Chris Fink | last post by:
I am using the System.IO.File class to determine if a file exists on a network share. The File.Exists method keeps returning false, even though the file does exist. The MSDN documentation...
2
by: .Net Believer | last post by:
I using the routine below to copy file to a network drive for a regular backup process. Before calling this routine I using another function to check the presence of the LAN connection and the...
26
by: Jan Engelhardt | last post by:
Hello, assume foo/bar.h exists, and is included as '#include "bar.h"' in foo/bar.c. `gcc -c foo/bar.c` will compile it fine (i.e. finds the file). Is this a gcc extension or a C compiler...
34
by: mr.polik | last post by:
Is it legal to do something like this: #include "x.c" in other source file? And is it good idea? Thank you in advance for your answers, Igor.
0
by: Filemaxor | last post by:
I have gotten my code to be able to allow people to add new text to a .txt document and able to call up files so the user can see whats in it. The problem i'm having is getting the for loop to work...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.