|
Posted by Gordon Burditt on 08/14/07 02:21
>Probably an incredibly simple answer, but I can't seem to phrase it so
>a search engine can understand it.
>
>I have a php script with a simple include:
>include("/include_this.php")
>
>I need to edit this so it accesses the file from another server. I
>have tried:
>include("http://192.168.1.1/include_this.php:)
Leaving aside the access problems, these mean something *VERY*
different. The first include means "take the contents of this file
and run it as PHP. The second include means *RUN* this file as
PHP, then take the *OUTPUT* and *RUN THAT* as PHP. These are
very, very different.
>But the file isn't in the web directory, which in this case is /usr/
>local/apache/htdocs. It is one level above the web directory. I don't
In which case what you are asking for seems to be a security violation.
>know how to reference /usr/local/apache/include_this.php on another
>linux server. I don't even know what the correct term or phrase would
>be for this. Any help will be greatly appreciated.
You can access remote files if there is a method to access them
remotely. You can't use HTTP since the file is outside the web
directory. Now, what other remote file protocols might be available?
FTP. NFS. Samba. Each has their own method of accessing remote
files. Each works only if the file is actually exported via that
method. Are any of these methods (or others for file export)
available and enabled on the server? If not, you don't access it
remotely.
[Back to original message]
|