[K12OSN] PHP and include?

Doug Simpson simpsond at leopards.k12.ar.us
Wed Oct 11 14:13:26 UTC 2006


Thank you. . . I had forgotten about the file_get_contents function.

Include works, too. . . I got that one figured out. . .

The include method is as follows:

<?php include 'http://hostname/directory/file.txt' ?>
or in my case for a file in a user's public_html folder:
<?php include 'http://hostname/~user/file.txt' ?>

I know there is some security functions to add to keep others from 
constructing scripts to ruin things and those will be added as well. . .

Thanks again for the responses!
Doug Simpson
Technology Specialist
DeQueen Public Schools
DeQueen, AR 71832
simpsond at leopards.k12.ar.us
Tux for President!

On Wed, 11 Oct 2006, george kocke wrote:

> Doug Simpson wrote:
>
>> If I am thinking correctly, there is an include function on php that will 
>> do this, but I need the syntax. Also, if possible, I need it to pull the 
>> txt file from the users' public_html folder.
>
> $text = file_get_contents($filename);
>
>
>
>
> This message has been scanned by the Internet Service Departments Virus/Spam 
> filter.
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>




More information about the K12OSN mailing list