Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16974
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Matthew Carter <m@ahungry.com> |
| Newsgroups | comp.lang.php |
| Subject | Re: Class 'Model' not found |
| Date | Tue, 23 Aug 2016 01:23:03 -0400 |
| Organization | Ahungry (http://ahungry.com) |
| Lines | 41 |
| Message-ID | <87shtwuki0.fsf@ahungry.com> (permalink) |
| References | <b08fa2e1-a17e-4bdf-86e0-aa65f96eb98a@googlegroups.com> <1563ad73-c46d-487f-84e0-a80a1217f2db@googlegroups.com> <1647269.ji5Ds1KI6Y@PointedEars.de> <npg0ln$adq$1@jstuckle.eternal-september.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | mx02.eternal-september.org; posting-host="7c986cd4736462de309a749b207746fe"; logging-data="27801"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VswzsOf3+OmIzDhArDZ5U" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
| Cancel-Lock | sha1:Q+NxRNufhrLwk4V6k19f+f3fYAg= sha1:+r437B9C9ldxOWSdQ8+YP1n4gD0= |
| Xref | csiph.com comp.lang.php:16974 |
Show key headers only | View raw
Jerry Stuckle <jstucklex@attglobal.net> writes: > On 8/22/2016 2:56 PM, the troll Thomas 'Pointed Head' Lahn wrote: >> M desinger wrote: >> >>> Full code index.php >>> >>> <?php >>> >>> include './application/model/model.php'; >>> include './application/config/system.php'; >>> include './application/config/language.lv.php'; >>> >>> 12 line ---> $class = new Model(); >> >> The “include” should be “require_once”, so that you get a “Fatal error” if >> the inclusion fails, the error message telling you *why* “require_once” >> failed. “require_once” instead of “require” includes those files only once, >> which avoids all sorts of problems. >> >> In any case, the leading “./” is superfluous. >> >> Finally, one uses namespaces and autoloading these days; *all* kinds of >> includes (include, include_once, require, and require_once) are deprecated >> for loading class files like model.php. RTFM. >> > > You've obviously not had the autoloading function pick up the wrong > version of a class. But that's not surprising from you. You have > repeatedly shown you have no concept of good coding techniques, and have > probably never had two classes of ANY name on your system. Why would you have 2 identically named classes in the same namespace (if different namespaces, alias them)? If you're actually referring to 2 versions of the same class at different points in time, why not a VCS? -- Matthew Carter (m@ahungry.com) http://ahungry.com
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-21 07:35 -0700
Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-21 07:36 -0700
Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-21 07:43 -0700
Re: Class 'Model' not found "J.O. Aho" <user@example.net> - 2016-08-21 18:08 +0200
Re: Class 'Model' not found "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-21 19:36 +0200
Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-22 20:56 +0200
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-22 19:08 -0400
Re: Class 'Model' not found Matthew Carter <m@ahungry.com> - 2016-08-23 01:23 -0400
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-23 08:07 -0400
Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-27 14:26 +0200
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-27 10:13 -0400
Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-28 02:12 +0200
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-27 20:32 -0400
Re: Class 'Model' not found Matthew Carter <m@ahungry.com> - 2016-08-28 00:00 -0400
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-28 08:40 -0400
Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 11:39 +0200
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 07:41 -0400
Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 14:41 +0200
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 09:02 -0400
Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 15:36 +0200
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 10:39 -0400
Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 11:35 +0200
Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-30 14:25 -0700
Re: Class 'Model' not found Gregor Kofler <usenet@gregorkofler.com> - 2016-08-31 00:35 +0200
Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-30 16:34 -0700
Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 19:58 -0400
csiph-web