Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #12343
| Message-ID | <1435585.JWNJUdetN8@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2013-12-21 20:24 +0100 |
| Subject | Re: Include gives warning |
| Newsgroups | comp.lang.php |
| References | <1ntef0hrqukct$.1ps7dz7dar5gu$.dlg@40tude.net> <bhm4qmFev65U1@mid.individual.net> |
Derek Turner wrote: > On Sat, 21 Dec 2013 10:36:29 -0500, richard wrote: >> <?php include "http://mroldies.net/artists/".$year."artists.php"; >> >> […] > > RTFM on the correct way to use include. HINT it has to be the true path to > a file on your server. No, it does not; it does not even have to be a regular file. However, if the above is to work, several conditions have to apply: - allow_url_fopen = 1 (default), allow_url_include = 1 (the default is 0); - Either PHP must not parse the resource accessed like that or it must generate from the parsed resource a PHP script resource; - The Web server (hardware) must be able to resolve the domain name to an IP address, using its DNS client (software). And it still would be comparably inefficient because of the unnecessary roundtrip. ,-<http://php.net/include> | | If "URL include wrappers" [1] are enabled in PHP, you can specify the file | to be included using a URL (via HTTP or other supported wrapper - see | Supported Protocols and Wrappers [2] for a list of protocols) instead of a | local pathname. If the target server interprets the target file as PHP | code, variables may be passed to the included file using a URL request | string as used with HTTP GET. This is not strictly speaking the same thing | as including the file and having it inherit the parent file's variable | scope; the script is actually being run on the remote server and the | result is then being included into the local script. | | [1] <http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include> | [2] <http://www.php.net/manual/en/wrappers.php> | `---- PointedEars -- > If you get a bunch of authors […] that state the same "best practices" > in any programming language, then you can bet who is wrong or right... Not with javascript. Nonsense propagates like wildfire in this field. -- Richard Cornford, comp.lang.javascript, 2011-11-14
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Include gives warning richard <noreply@example.com> - 2013-12-21 10:36 -0500
Re: Include gives warning richard <noreply@example.com> - 2013-12-21 11:03 -0500
Re: Include gives warning Derek Turner <frderek@cesmail.net> - 2013-12-21 18:26 +0000
Re: Include gives warning Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2013-12-21 14:02 -0500
Re: Include gives warning Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-12-21 20:24 +0100
Re: Include gives warning richard <noreply@example.com> - 2013-12-21 14:36 -0500
Re: Include gives warning "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2013-12-21 22:09 +0000
Re: Include gives warning Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-21 23:46 +0000
Re: Include gives warning Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-12-21 19:42 -0800
Re: Include gives warning Luuk <luuk@invalid.lan> - 2013-12-22 16:11 +0100
csiph-web