Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #12806
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Nested PHP |
| Date | 2014-02-12 06:30 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <ldfm0i$6b1$1@dont-email.me> (permalink) |
| References | (4 earlier) <slrnlfkc1b.v5n.hellsop@nibelheim.ninehells.com> <lddc19$crf$1@dont-email.me> <slrnlflgqg.v5n.hellsop@nibelheim.ninehells.com> <ldeh8h$tkd$1@dont-email.me> <1lgy8o1.4vb3i3fbpwjqN%adrian@poppyrecords.invalid.invalid> |
On 2/12/2014 5:13 AM, Adrian Tuddenham wrote: > Jerry Stuckle <jstucklex@attglobal.net> wrote: > >> On 2/11/2014 7:41 PM, Peter H. Coffin wrote: >>> On Tue, 11 Feb 2014 09:27:54 -0500, Jerry Stuckle wrote: >>>> On 2/11/2014 9:14 AM, Peter H. Coffin wrote: >>>>> On Mon, 10 Feb 2014 16:51:37 -0500, Jerry Stuckle wrote: >>>>>> On 2/10/2014 4:44 PM, Adrian Tuddenham wrote: >>>>>>> I was using a browser to view it, but the source code was coming from a >>>>>>> php program, not directly from a file on the server. >>>>>>> >>>>>>> >>>>>> >>>>>> Anything output by a PHP program is sent directly to the client. It is >>>>>> not processed (again) by the web server, so the php code you generate >>>>>> will never be processed. >>>>>> >>>>>> The browser will see exactly what you sent - nothing more, nothing less. >>>>> >>>>> Right. >>>>> >>>>> Hmm... Might be worth trying writing to a temporary file, include()ing >>>>> it, then cleaning up at the end of the script. It's a LITTLE >>>>> complicated, but... >>>>> >>>> >>>> And subject to all kinds of problems - such as concurrency with others >>>> requesting the same page, getting rid of old copies, having to redirect >>>> the browser to the temporary file, the user bookmarking the temporary >>>> file... and probably several others. >>> >>> I think those are surmountable, with proper planning. Generating a >>> guaranteed unique filename for the temporary file is essentially a >>> solved problem, for example. >>> >>> The big question, though, is why can't this be solved WITHOUT the clunky >>> mechanism. It almost smells richard-ish... >>> >> >> That takes care of the concurrency problem - but that's all it takes >> care of. When do you delete the file, for instance? Or what if the >> user bookmarks the file? > > How do you delete the file? I have tried a few 'obvious' (obvious to > me, that is) methods, but they don't seem to work. I initially tried > going down the temporary file route, but my inability to find a way of > deleting the files was one reason why I abandoned it. > Which is only one reason this is a bad way of doing it. But these were questions to point out problems with this method. BTW - to delete files, you use unlink(). See the documentation at www.php.net - it's the best reference around. > >> But I also agree with you it sounds almost richard-ish. > > Sorry if my beginner's questions sound like that, but I have started > trying to teach myself php from a position of almost complete ignorance, > especially in the way servers work. My previous experience of using a > 'server', if you can call it that, was programming in AlgolW under > Multics on an ICL System 4 mainframe in the 1970s; what little > programming I have done since then has been on desktop machines. > > There are plenty of references to php on the Web, but using them to > learn a programming language is like trying to learn to drive a car by > reading detailed descriptions of the clutch pedal, the brake pedal and > the accelerator pedal. > > I feet I needed to read through a selection of easy-to-follow examples > of how real programmers solve real (straightforward) problems in the > world of php - but as these don't seem to be available in any sort of > collected form, I have turned to this group for guidance. > > Forget most of the web-based references. There's a lot more crap out there than there is good stuff. The best reference is the doc at www.php.net, as I said above. Other than that, I would highly suggest you visit your local book store. At least books have been through an editorial process, and in general are better. Sorry I don't have any specific ones to suggest; it's been a while since I've looked. Normally I also suggest your public library - but if it's like the one we have, the books will be several years old and way out of date for PHP. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-10 20:24 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-10 15:56 -0500
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-10 21:44 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-10 16:51 -0500
Re: Nested PHP "Peter H. Coffin" <hellsop@ninehells.com> - 2014-02-11 08:14 -0600
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-11 09:27 -0500
Re: Nested PHP "Peter H. Coffin" <hellsop@ninehells.com> - 2014-02-11 18:41 -0600
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-11 20:03 -0500
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-12 10:13 +0000
Re: Nested PHP Tim Streater <timstreater@greenbee.net> - 2014-02-12 10:33 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-12 06:30 -0500
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-12 12:52 +0000
Re: Nested PHP The Natural Philosopher <tnp@invalid.invalid> - 2014-02-12 13:11 +0000
Re: Nested PHP Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-13 06:55 +0000
Re: Nested PHP "Peter H. Coffin" <hellsop@ninehells.com> - 2014-02-13 12:02 -0600
Re: Nested PHP Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2014-02-12 12:14 +0000
Re: Nested PHP The Natural Philosopher <tnp@invalid.invalid> - 2014-02-10 22:09 +0000
Re: Nested PHP Christoph Michael Becker <cmbecker69@arcor.de> - 2014-02-10 23:23 +0100
Re: Nested PHP Tim Streater <timstreater@greenbee.net> - 2014-02-10 22:27 +0000
Re: Nested PHP Geoff Muldoon <geoff.muldoon@trap.gmail.com> - 2014-02-11 09:30 +1100
Re: Nested PHP Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-10 23:06 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-10 20:46 -0500
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-11 10:11 +0000
Re: Nested PHP Tim Streater <timstreater@greenbee.net> - 2014-02-11 11:17 +0000
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-11 12:01 +0000
Re: Nested PHP Tim Streater <timstreater@greenbee.net> - 2014-02-11 12:45 +0000
Re: Nested PHP Christoph Michael Becker <cmbecker69@arcor.de> - 2014-02-11 13:55 +0100
Re: Nested PHP Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-11 13:29 +0000
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-11 14:31 +0000
Re: Nested PHP Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-11 17:24 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-11 08:15 -0500
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-11 14:31 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-11 10:10 -0500
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-11 15:31 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-11 11:24 -0500
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-12 10:13 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-12 06:33 -0500
Re: Nested PHP Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-02-11 15:26 +0000
Re: Nested PHP Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-02-11 14:41 +0000
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-02-11 15:31 +0000
Re: Nested PHP Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-02-11 15:53 +0000
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-11 11:26 -0500
Re: Nested PHP bill <william@TechServSys.com> - 2014-02-11 07:12 -0500
Re: Nested PHP richard <noreply@example.com> - 2014-02-12 09:33 -0500
Re: Nested PHP Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-13 06:47 +0000
Re: Nested PHP Scott Johnson <noonehome@chalupasworld.com> - 2014-02-13 05:01 -0800
Re: Nested PHP Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-02-14 07:19 -0800
Re: Nested PHP Scott Johnson <noonehome@chalupasworld.com> - 2014-02-14 10:43 -0800
Re: Nested PHP Arno Welzel <usenet@arnowelzel.de> - 2014-03-02 15:54 +0100
Re: Nested PHP adrian@poppyrecords.invalid.invalid (Adrian Tuddenham) - 2014-03-02 18:10 +0000
Re: Nested PHP The Natural Philosopher <tnp@invalid.invalid> - 2014-03-03 11:38 +0000
Re: Nested PHP Arno Welzel <usenet@arnowelzel.de> - 2014-03-17 15:26 +0100
Re: Nested PHP Jerry Stuckle <jstucklex@attglobal.net> - 2014-03-17 10:52 -0400
Re: Nested PHP The Natural Philosopher <tnp@invalid.invalid> - 2014-03-17 15:33 +0000
Re: Nested PHP "Peter H. Coffin" <hellsop@ninehells.com> - 2014-03-17 17:10 -0500
Re: Nested PHP The Natural Philosopher <tnp@invalid.invalid> - 2014-03-17 23:01 +0000
Re: Nested PHP Christoph Michael Becker <cmbecker69@arcor.de> - 2014-03-18 00:31 +0100
Re: Nested PHP The Natural Philosopher <tnp@invalid.invalid> - 2014-03-18 13:10 +0000
Re: Nested PHP Gabe <usenet@moojuice.net> - 2014-03-17 15:18 +0000
csiph-web