|
Posted by Nick on 11/24/05 20:31
anne001 wrote:
> Thank you very much.
>
> It just occured to me that the faculty's request to keep the raw data
> off limit may just not be possible: Any student can read the php code,
> find the address of the
> raw file, and download all of it.
>
> It seems to me his TA will have to run the script once a day to a file,
> which the students will in turn access with your little script.
>
> I was running through the tutorial
> http://www.macdevcenter.com/pub/a/mac/2005/08/30/apache.html
> to set php up -- which the students will have to do also.
Are the students accessing this through a browser? If so then they won't
be able to read the PHP source code, and the raw file doesn't need to
be accessible to them, only by the script.
To do this you will probably want to move the raw file so it's not under
the web directory, and then access it as file('../file.txt') or whatever
the path would be then. That way they can't get to the file.
If they're running PHP directly as a command-line script, then you will
just have to make sure that the raw file permissions make it unreadable
to the students, but readable to PHP (which has default user 'nobody',
I think).
> If we turn off allow_url_fopen, will file work?
Yes, that only applies to opening files from remote http:// locations,
in my example it was a local file.
Navigation:
[Reply to this message]
|