FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Nested PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Nested PHP [message #184874 is a reply to message #184873] Wed, 12 February 2014 13:11 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
On 12/02/14 12:52, Adrian Tuddenham wrote:
>> BTW - to delete files, you use unlink(). See the documentation at
>>> www.php.net - it's the best reference around.
> I found that function and tried it, but the file didn't seem to go away
> - its name was still visible even after I updated the file listings in
> my ftp program. Eventually I deleted it manually by ftp.
>
> Perhaps I got something wrong or I didn't wait long enough before
> checking; I'll try again.

I found many issues when handling external files with PHP.

I conjectured that PHP caches files and filenames internally, only
flushing to disk on exit.


For example writing a file to disk didn't happen so that mysql could use
it in a load file command unless it was copy()ed first.

unlink() for a file generated within PHP did work. But the same is not
true of files outside of it that may not have write permission for
whatever process spawned PHP..

My response to these issues has been to insert binary data using a
hexadecimal number string, instead of load file, and to use the mysql
database as a repository for all data, rather than the native OS file
system.

Mysql at least has a single unique interface and will queue asynchronous
requests, so that it always does what it says on the tin.

AS far as access to PDFS go, the approach I would take is to put them in
a database too in a BLOB, and use a php script to serve them that
authenticates the user (as identified by a cookie) as valid, or returns
an unauthorised access code.

writing PHP for authorised users is not a noobs easiest task, but its is
one that needs to be mastered if you are going to make the distinction
between authorised and public access.,




--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Filling an array with random input doesn't quite work
Next Topic: string length
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 20:52:51 GMT 2024

Total time taken to generate the page: 0.33084 seconds