Search Results

Search found 145 results on 6 pages for 'autoload'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Single complex or multiple simple autoload functions [on hold]

    - by Tyson of the Northwest
    Using the spl_autoload_register(), should I use a single autoload function that contains all the logic to determine where the include files are or should I break each include grouping into it's own function with it's own logic to include the files for the called function? As the places where include files may reside expands so too will the logic of a single function. If I break it into multiple functions I can add functions as new groupings are added, but the functions will be copy/pastes of each other with minor alterations. Currently I have a tool with a single registered autoload function that picks apart the class name and tries to predict where it is and then includes it. Due to naming conventions for the project this has been pretty simple. if has namespace if in template namespace look in Root\Templates else look in Root\Modules\Namespace else look in Root\System if file exists include But we are starting to include Interfaces and Traits into our codebase and it hurts me to include the type of a thing in it's name. So we are looking at instead of a single autoload function that digs through the class name and looks for the file and has increasingly complex logic to it, we are looking at having multiple autoload functions registered. But each one follows the same pattern and any time I see that I get paranoid about code copying. function systemAutoloadFunc logic to create probable filename if filename exists in system include it and return true else return false function moduleAutoloadFunc logic to create probable filename if filename exists in modules include it and return true else return false Every autoload function will follow that pattern and the last of each function if filename exists, include return true else return false is going to be identical code. This makes me paranoid about having to update it later across the board if the file_exists include pattern we are using ever changes. Or is it just that, paranoia and the multiple functions with some identical code is the best option?

    Read the article

  • php: autoload exception handling.

    - by YuriKolovsky
    Hello again, I'm extending my previous question (Handling exceptions within exception handle) to address my bad coding practice. I'm trying to delegate autoload errors to a exception handler. <?php function __autoload($class_name) { $file = $class_name.'.php'; try { if (file_exists($file)) { include $file; }else{ throw new loadException("File $file is missing"); } if(!class_exists($class_name,false)){ throw new loadException("Class $class_name missing in $file"); } }catch(loadException $e){ header("HTTP/1.0 500 Internal Server Error"); $e->loadErrorPage('500'); exit; } return true; } class loadException extends Exception { public function __toString() { return get_class($this) . " in {$this->file}({$this->line})".PHP_EOL ."'{$this->message}'".PHP_EOL . "{$this->getTraceAsString()}"; } public function loadErrorPage($code){ try { $page = new pageClass(); echo $page->showPage($code); }catch(Exception $e){ echo 'fatal error: ', $code; } } } $test = new testClass(); ?> the above script is supposed to load a 404 page if the testClass.php file is missing, and it works fine, UNLESS the pageClass.php file is missing as well, in which case I see a "Fatal error: Class 'pageClass' not found in D:\xampp\htdocs\Test\PHP\errorhandle\index.php on line 29" instead of the "fatal error: 500" message I do not want to add a try/catch block to each and every class autoload (object creation), so i tried this. What is the proper way of handling this?

    Read the article

  • php require and autoload

    - by dfilkovi
    I use __autoload to load classes, and I keep getting errors that no class is found but file get's loaded ok. Then if I change something in a file, just something like add a new line and save it, everything works fine and class is then found. But this is a great problem cause there are thousands of files in this project and I don't want to change them one by one. I'm using php 5.3.0 on windows. What could be the problem?

    Read the article

  • Javascript, autoload text box while typing....

    - by user299676
    I am trying to do this but keep on failing. I have a text box. I have also an array of cities, and i want, while typing to display the cities that the user should be able to select. Like if the user is typing : Mu the drop down should display Mumbai \n MuMu ... etc Like the Tags below is doing ! Does someone have any ideas in how this can be accomplished ?

    Read the article

  • Namespace Autoload works under windows, but not on Linux

    - by EvilChookie
    I have the following php code: index.php <?php spl_autoload_extensions(".php"); spl_autoload_register(); use modules\standard as std; $handler = new std\handler(); $handler->delegate(); ?> modules\standard\handler.php <?php namespace modules\standard { class handler { function delegate(){ echo 'Hello from delegation!'; } } } ?> Under Windows 7, running WAMP, the code produces the message "Hello from Delegation!" however under Linux, I get the following: Fatal error: spl_autoload(): Class modules\standard\handler could not be loaded in /var/www/index.php on line 15 Windows is running PHP 5.3.0 under WAMP, and Linux is running the 5.3.2 dotdeb package under Ubuntu 9.10. Is this a configuration issue on my linux box, or just a difference in the way namespaces and autoloading is handled on the different operating systems

    Read the article

  • Ruby's autoload not working in 1.8.7 or Ruby Enterprise?

    - by webren
    I've written a gem and within a file I am doing this to autoload my main gem logic: $:.push File.expand_path('lib', __FILE__) require "oa-casport/version" require 'omniauth/core' module OmniAuth module Strategies autoload :Casport, 'omniauth/strategies/casport' end end For Ruby versions 1.8.7 and ree, it prints out "no such file to load - omniauth/strategies/casport' But it doesn't print out this message on version 1.9.2. Is there something off with the location of calling autoload? The repo for the gem is located at https://github.com/stevenhaddox/oa-casport

    Read the article

  • PHP PSR-0 + several namespaces in one file and autoload

    - by Nemoden
    I've been thinking for a while about defining several namespaces in one php file and so, having several classes inside this file. Suppose, I want to implement something like Doctrine\ORM\Query\Expr: Expr.php Expr |-- Andx.php |-- Base.php |-- Comparison.php |-- Composite.php |-- From.php |-- Func.php |-- GroupBy.php |-- Join.php |-- Literal.php |-- Math.php |-- OrderBy.php |-- Orx.php `-- Select.php It would be nice if I had all of this in one file - Expr.php: namespace Doctrine\ORM\Query; class Expr { // code } namespace Doctrine\ORM\Query\Expr; class Func { // code } // etc... What I'm thinking of is directories naming convention and, unlike PSR-0 having several classes and namespaces in one file. It's best explained by the code: ls Doctrine/orm/query Expr.php that's it - only Expr.php Since Expr.php is somewhat I call a "meta-namespace" for Expr\Func, it make sense to place all the classes inside Expr.php (as shown above). So, the vendor name is still starts with an uppercased letter (Doctrine) and the other parts of namespace start with lowercased letter. We can write an autoload so it would respect this notion: function load_class($class) { if (class_exists($class)) { return true; } $tokenized_path = explode(array("_", "\\"), DIRECTORY_SEPARATOR, $class); // array('Doctrine', 'orm', 'query', 'Expr', 'Func'); // ^^^^ // first, we are looking for first uppercased namespace part // and if it's not last (not the class name), we use it as a filename // and wiping away the rest to compose a path to a file we need to include if (FALSE !== ($meta_class_index = find_meta_class($tokenized_path))) { $new_tokenized_path = array_slice($tokenized_path, 0, $meta_class_index); $path_to_class = implode(DIRECTORY_SEPARATOR, $new_tokenized_path); } else { // no meta class found $path_to_class = implode(DIRECTORY_SEPARATOR, $tokenized_path); } if (file_exists($path_to_class.'.php')) { require_once $path_to_class.'.php'; } return false; } Another reason to do so is to reduce a number of php files scattered among directories. Usually you check file existence before you require a file to fail gracefully: file_exists($path_to_class.'.php'); If you take a look at actual Doctrine\ORM\Query\Expr code, you'll see they use all of the "inner-classes", so you actually do: file_exists("/path/to/Doctrine/ORM/Query/Expr.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/AndX.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Base.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Comparison.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Composite.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/From.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Func.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/GroupBy.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Join.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Literal.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Math.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/OrderBy.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Orx.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Select.php"); in your autoload which causes quite a few I/O reads. Isn't it too much to check on each user's hit? I'm just putting this on a discussion. I want to hear from another PHP programmers what do they think of it. And, of course, if you have a silver bullet addressing this problems I've designated here, please share. I also have been thinking if my vogue question fits here and according to the FAQ it seems like this question addresses "software architecture" problem slash proposal. I'm sorry if my scribble may seem a bit clunky :) Thanks.

    Read the article

  • When should I use Perl's AUTOLOAD?

    - by Robert S. Barnes
    In "Perl Best Practices" the very first line in the section on AUTOLOAD is: Don't use AUTOLOAD However all the cases he describes are dealing with OO or Modules. I have a stand alone script in which some command line switches control which versions of particular functions get defined. Now I know I could just take the conditionals and the evals and stick them naked at the top of my file before everything else, but I find it convenient and cleaner to put them in AUTOLOAD at the end of the file. Is this bad practice / style? If you think so why, and is there a another way to do it? As per brian's request I'm basically using this to do conditional compilation based on command line switches. I don't mind some constructive criticism. sub AUTOLOAD { our $AUTOLOAD; (my $method = $AUTOLOAD) =~ s/.*:://s; # remove package name if ($method eq 'tcpdump' && $tcpdump) { eval q( sub tcpdump { my $msg = shift; warn gf_time()." Thread ".threads->tid().": $msg\n"; } ); } elsif ($method eq 'loginfo' && $debug) { eval q( sub loginfo { my $msg = shift; $msg =~ s/$CRLF/\n/g; print gf_time()." Thread ".threads->tid().": $msg\n"; } ); } elsif ($method eq 'build_get') { if ($pipelining) { eval q( sub build_get { my $url = shift; my $base = shift; $url = "http://".$url unless $url =~ /^http/; return "GET $url HTTP/1.1${CRLF}Host: $base$CRLF$CRLF"; } ); } else { eval q( sub build_get { my $url = shift; my $base = shift; $url = "http://".$url unless $url =~ /^http/; return "GET $url HTTP/1.1${CRLF}Host: $base${CRLF}Connection: close$CRLF$CRLF"; } ); } } elsif ($method eq 'grow') { eval q{ require Convert::Scalar qw(grow); }; if ($@) { eval q( sub grow {} ); } goto &$method; } else { eval "sub $method {}"; return; } die $@ if $@; goto &$method; }

    Read the article

  • Selective PHP autoload

    - by Extrakun
    I am writing a add-on module which is integrated with an existing PHP application; Because I am using a MVC pattern, and which may requires lot of inclusion of classes (which might not be used at all depending on the action of the user), I decide to use autoloading of classes. However, I have to ensure that the autoload function does not interferes with the normal operations of the existing applications. Does autoload only kicks in if a class name is not defined? Say I have to write another module which uses its own autoload functions (say, I have an autoload for a module, since they each reside in their own folder), how do I differentiate which module is it for? For #2, I thought of 2 options. Either prefix the class name with the module name (Such as 'MyNewModule_View_Default' and 'AnotherModule_View_Default'), or use file_exists to check the include file exists. Other suggestions are welcomed too!

    Read the article

  • Loading a helper elsewhere than the autoload.php?

    - by drpcken
    I inherited a project and I'm cleaning up a bit and trying to finish it. I noticed that they used (or wrote) a breadcrumb helper. It is in my helpers folder and is named breadcrumb_helper.php It has a single function to build a breadcrumb menu with links and pass it to the view breadcrumbs.php. Here's the code: function show_breadcrumbs() { $ci =& get_instance(); $ci->load->helper('inflector'); $data = ''; //build breadcrumb and store in $data $this->load->view("breadcrumbs", $data) } I was trying to figure out how this helper worked and I checked the autoload.php but there is no reference to the helper in there. In face here is my autoload: $autoload['helper'] = array('url','asset','combine','navigation','form','portfolio','cookie','default'); This show_breadcrumbs() function is used quite a bit in some of my pages so I'm confused as to how its loading if it isn't in the autoloader. It is called like this in a few of my pages: <?=show_breadcrumbs()?> What am I missing? Why isn't this in my autoload? I even did a global search and couldn't find anywhere the helper is being loaded.

    Read the article

  • Perl When is using AUTOLOAD OK?

    - by Robert S. Barnes
    In "Perl Best Practices" the very first line in the section on AUTOLOAD is: Don't use AUTOLOAD However all the cases he describes are dealing with OO or Modules. I have a stand alone script in which some command line switches control which versions of particular functions get defined. Now I know I could just take the conditionals and the evals and stick them naked at the top of my file before everything else, but I find it convenient and cleaner to put them in AUTOLOAD at the end of the file. Is this bad practice / style? If you think so why, and is there a another way to do it?

    Read the article

  • SQLAlchemy declarative syntax with autoload in Pylons

    - by Juliusz Gonera
    I would like to use autoload to use an existings database. I know how to do it without declarative syntax (model/_init_.py): def init_model(engine): """Call me before using any of the tables or classes in the model""" t_events = Table('events', Base.metadata, schema='events', autoload=True, autoload_with=engine) orm.mapper(Event, t_events) Session.configure(bind=engine) class Event(object): pass This works fine, but I would like to use declarative syntax: class Event(Base): __tablename__ = 'events' __table_args__ = {'schema': 'events', 'autoload': True} Unfortunately, this way I get: sqlalchemy.exc.UnboundExecutionError: No engine is bound to this Table's MetaData. Pass an engine to the Table via autoload_with=<someengine>, or associate the MetaData with an engine via metadata.bind=<someengine> The problem here is that I don't know where to get the engine from (to use it in autoload_with) at the stage of importing the model (it's available in init_model()). I tried adding meta.Base.metadata.bind(engine) to environment.py but it doesn't work. Anyone has found some elegant solution?

    Read the article

  • How can I use geoalchemy with elixir autoload tables?

    - by Dan Ellis
    I'm using geoalchemy and autoloaded tables, but I'd like to use Elixir, because it has a nicer query syntax. Does anyone know how to get them to work together? I did get it working with this code -- http://pastie.textmate.org/private/y3biyvosuejkrtxbpdv1a -- but that still gives the ugly warning about not recognising the geometry column when the table is reflected. Ideally, what I'd like to do is to get SQLAlchemy's own table reflection to recognise the geometry columns. How would I plumb them together?

    Read the article

  • What is the autoload class names structure, for the root "library" dir in a Zend Framework 1.10.2 pr

    - by Doron
    I have a project I created with Zend Framework 1.10.2. I usually use the application/models directory for new model files I create, and the auto loading is fine, so for example - My_Model_SampleClass is located application/models/SampleClass.php. However, I have just created a custom Exception class, and it does not fit in the models directory inside the application dir (at least the way I see it, I could be logically wrong), so I've created it in the root "library" dir, but I can't seem to find the correct class name + file name to use, so auto loading will be done correctly. BTW, I use a namespace for all custom classes I use, let's assume it's "My".

    Read the article

  • Is autoload thread-safe in Ruby 1.9?

    - by SFEley
    It seems to me that the Ruby community has been freaking out a little about autoload since this famous thread, discouraging its use for thread safety reasons. Does anyone know if this is no longer an issue in Ruby 1.9.1 or 1.9.2? I've seen a bit of talk about wrapping requires in mutexes and such, but the 1.9 changelogs (or at least as much as I've been able to find) don't seem to address this particular question. I'd like to know if I can reasonably start autoloading in 1.9-only libraries without any reasonable grief. Thanks in advance for any insights.

    Read the article

  • CodeIgniter: Weird echo of $config coming back when I load Email Library

    - by k00k
    Version info: CI version 1.7.2 - PHP 5.3.1 - Apache2 - Mac OSX 10.6.3 For some reason, when I load CI's email library, either in my controller, or in autoload.php, it automatically and immediately echoes the config info like so: $config['protocol'] = 'sendmail'; $config['mailpath'] = '/usr/sbin/sendmail'; $config['charset'] = 'iso-8859-1'; $config['wordwrap'] = TRUE If I autoload the email library in autoload.php, it is echoed before anything else in my source/page. If I call it explicitly within my controller, it's echoed at that exact point. I'm stumped, never seen that before. Any ideas on how to surpress/eliminate?

    Read the article

  • Why isn't the scripts in my autoload folder being executed in Vim?

    - by Codemonkey
    I'm trying to use Pathogen to manage my Vim extensions. My bundle folder looks like this: .../bundle/ +-- vim-pathogen ¦   +-- autoload ¦   +-- pathogen.vim +-- vim-smoothscroll +-- autoload +-- smooth_scroll.vim And my vimrc file includes this: let s:root = fnamemodify(resolve(expand(":p")), ":h") " Initiate pathogen. exec "source " . s:root . "/vimfiles/bundle/vim-pathogen/autoload/pathogen.vim" exec pathogen#infect() My vimrc file is a symlink located in ~ but pointing to a folder inside my Dropbox folder. This appears to work when I start Vim. Pathogen has added vim-smoothscroll to my runtimepath: :set runtimepath? runtimepath=~/Dropbox/Personal/config_sync/vim/vimfiles,~/Dropbox/Personal/config_sync/vim/vimfiles/bundle/vim-p athogen,~/Dropbox/Personal/config_sync/vim/vimfiles/bundle/vim-smoothscroll,~/.vim,~/vim/share/vim/vimfiles,~/vim/ share/vim/vim74,~/vim/share/vim/vimfiles/after,~/.vim/after The problem is that the script smooth_scroll.vim hasn't been loaded: 1: ~/.vimrc 2: ~/Dropbox/Personal/config_sync/vim/vimfiles/bundle/vim-pathogen/autoload/pathogen.vim 3: ~/vim/share/vim/vim74/syntax/syntax.vim 4: ~/vim/share/vim/vim74/syntax/synload.vim 5: ~/vim/share/vim/vim74/syntax/syncolor.vim 6: ~/vim/share/vim/vim74/filetype.vim 7: ~/vim/share/vim/vim74/menu.vim 8: ~/vim/share/vim/vim74/autoload/paste.vim 9: ~/Dropbox/Personal/config_sync/vim/vimfiles/colors/codeschool.vim 10: ~/Dropbox/Personal/config_sync/vim/_vimrc_gui 11: ~/Dropbox/Personal/config_sync/vim/_vimrc_keybinds 12: ~/vim/share/vim/vim74/plugin/getscriptPlugin.vim 13: ~/vim/share/vim/vim74/plugin/gzip.vim 14: ~/vim/share/vim/vim74/plugin/matchparen.vim 15: ~/vim/share/vim/vim74/plugin/netrwPlugin.vim 16: ~/vim/share/vim/vim74/plugin/rrhelper.vim 17: ~/vim/share/vim/vim74/plugin/spellfile.vim 18: ~/vim/share/vim/vim74/plugin/tarPlugin.vim 19: ~/vim/share/vim/vim74/plugin/tohtml.vim 20: ~/vim/share/vim/vim74/plugin/vimballPlugin.vim 21: ~/vim/share/vim/vim74/plugin/zipPlugin.vim 22: ~/vim/share/vim/vim74/syntax/ruby.vim 23: ~/vim/share/vim/vim74/syntax/vim.vim 24: ~/vim/share/vim/vim74/syntax/python.vim Why is that? Loading the script manually works fine.

    Read the article

  • Codeigniter return config file as array with autoload enabled

    - by Fverswijver
    So I'm using CodeIgniter to build a website and I've made it so that all my specific settings are stored in a config file that's automatically loaded. I've also built a page that loads the settings file, makes a nice little table and allows me to edit everything from that page, afterwards it saves the entire page again (I know I could've done the same with a database but I want to try it this way). My problem is that I can't seem to use this bit when autoloading of my config file is enabled, but when I disable autoloading I can't seem to manually load it, it never finds my variables. So what I'm doing here is just taking all values from the config file and putting them in a single array so I can pass this array onto my settings administration page (edit/show all settings). $this->config->load('site_settings', TRUE); $data['settings'] = $this->config->item('site_settings'); ... $this->load->view('template', $data); config/site_settings.php <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $config['header_img'] = './img/header/'; $config['copyright_text'] = 'Copyright Instituto Kabu'; $config['copyright_font'] = './system/fonts/motoroil.ttf'; $config['copyright_font_color'] = 'ffffff'; $config['copyright_font_size'] = '32';

    Read the article

  • Catch requests to non-existent classes (not autoload)

    - by Spot
    Is there a manner in which to catch requests to a class which does not exist. I'm looking for something exactly like __call() and __static(), but for classes as opposed to methods in a class. I am not talking about autoloading. I need to be able to interrupt the request and reroute it. Ideas?

    Read the article

  • Extjs - Loading Grid when call

    - by Oxi
    I have form and grid. the user must enter data in form fields then display related records in the grid. I want to implement a search form, e.g: user will type the name and gender of the student, then will get a grid of all students have the same name and gender. So, I use ajax to send form fields value to PHP and then creat a json_encode wich will be used in grid store. I am really not sure if my idea is good. But I haven't found another way to do that. The problem is when I set autoLoad to true in the store, the grid automatically filled with all data - not just what I asked for - So, I understand that I have to set autoLoad to false, but then the result not shown in the grid even it returned successfully in the firebug! I don't know what to do. My View: { xtype: 'panel', layout: "fit", id: 'searchResult', flex: 7, title: '<div style="text-align:center;"/>SearchResultGrid</div>', items: [ { xtype: 'gridpanel', store: 'advSearchStore', id: 'AdvSearch-grid', columns: [ { xtype: 'gridcolumn', dataIndex: 'name', align: 'right', text: 'name' }, { xtype: 'gridcolumn', dataIndex: 'gender', align: 'right', text: 'gender' } ], viewConfig: { id : 'Arr' ,emptyText: 'noResult' }, requires: ['MyApp.PrintSave_toolbar'], dockedItems: [ { xtype: 'PrintSave_tb', dock: 'bottom', } ] } ] }, My Store and Model: Ext.define('AdvSearchPost', { extend: 'Ext.data.Model', proxy: { type: 'ajax', url: 'AdvSearch.php', reader: { type: 'json', root: 'Arr', totalProperty: 'totalCount' } }, fields: [ { name: 'name'}, { name: 'type_and_cargo'} ] }); Ext.create('Ext.data.Store', { pageSize: 10, autoLoad: false, model: 'AdvSearchPost', storeId: 'AdvSearchPost' });

    Read the article

  • JavaScript - Why does google-maps wait until jquery finishes download?

    - by Teddyk
    I'm using the following Google Maps autload (asynchronous) to load asynchronous both Google Maps v3 and JQuery, like so: <script type="text/javascript" src="http://www.google.com/jsapi?autoload={ "modules":[ {name:"maps",version:3,other_params:"sensor=false"},{"name":"jquery","version":"1.4.2"},{"name":"jqueryui","version":"1.8.1"} ]}"></script> However, looking at the network traffic, it appears that it is not downloading asynchronously. Question: Does anyone understand why the %7Bcommon (google-maps) file is being delayed from download until the jquery-ui.min file completes download first?

    Read the article

  • PHP Doctrine: cannot find ClassName, but factory loading works..?

    - by ropstah
    I'm using PHP Doctrine and i've setup autoloading: spl_autoload_register(array('Doctrine', 'autoload')); spl_autoload_register(array('Doctrine', 'modelsAutoload')); I can create a table like so: $table = Doctrine_Core::getTable('TableName'); However if I try it like this, it doesn't work, what am I missing?: $table = new TableNameTable(); //Yes it should be TableNameTable

    Read the article

  • Module autoloader in ZF

    - by ChrisRamakers
    The manual on Zend_Application_Module_Autoloader states the following: When using module bootstraps with Zend_Application, an instance of Zend_Application_Module_Autoloader will be created by default for each discrete module, allowing you to autoload module resources. Source: http://framework.zend.com/manual/zh/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.module This requires me to create an empty bootstrap class for each of my modules or else resource autoloading per module won't work with the build-in autoloader. Now I have two questions What is a discrete module? Is there a way to have this resource autoloader registered by default for each module without the need to create a bootstrap file for each module? I want it available in each module and creating so many empty bootstrap classes is something i'd rather prevent.

    Read the article

  • Replacement for PHP's __autoload function?

    - by Josh
    I have read about dynamically loading your class files when needed in a function like this: function __autoload($className) { include("classes/$className.class.php"); } $obj = new DB(); Which will automatically load DB.class.php when you make a new instance of that class, but I also read in a few articles that it is bad to use this as it's a global function and any libraries that you bring into your project that have an __autoload() function will mess it up. So does anyone know of a solution? Perhaps another way to achieve the same effect as __autoload()? Until I find a suitable solution I'll just carry on using __autoload() as it doesn't start becoming a problem until you bring in libraries and such. Thanks.

    Read the article

1 2 3 4 5 6  | Next Page >