Where to put my class files
| From: | Peter Lauri | Date: | Tue, 28 Feb 2006 05:55:18 +0000 |
| Subject: | Where to put my class files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-231185@lists.php.net to get a copy of this message | ||
Best group member,
I want to run the backend of the system under HTTPS for security reasons.
The pages in HTTP and HTTPS are both using the same classfiles.
Right now I have the class files in httpdocs/classes/
In the httpsdocs/admin I have a variable
$class_path='http://www.mydomain.com/classes/'; to
describe where the class
files can be found. I do this that does not generate an error:
require_once($class_path.'orderadmin.class.php');
When I then do below it gives be an error.
echo OrderAdmin::getNewOrderList();
Fatal error: Undefined class name 'orderadmin' in
/home/httpd/vhosts/mydomain.com/httpsdocs/admin/order.php on line 46
When running on the localhost and with the admin in a subfolder in HTTP it
is no problems.
Where should I locate my class files so that they are visible for both HTTP
and HTTPS? And how should I set my $class_path? I do not think my
$class_path is good enoght, because then I would not have that problem.
I have tried: $class_path='../../http/classes/';
But it does not work. Help me; I will kill myself soon... :)
Best regards,
Peter Lauri