CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Best Location for adding Constants sitewide

Print topic Send  topic

Author Message
idh63

Posts: 76
Posted: 09/21/2008, 7:14 AM

hi there,

Where is the safest place to place custom sitewide files like custom classes, functions, and constants?

I usually build my constants from a db table with an admin page that allows the chief admin to change the values of those constants as needed. I have a custom function that loads those constants.

I have been referencing the custom functions and classes in After Initialize on each page. Is there anywhere in the common.php file where I can safely add these without breaking the common.php file from updating as needed by CCS?

Thanks
View profile  Send private message
datadoit
Posted: 09/21/2008, 4:33 PM

We like to keep our goodies in their own file, then call that file at
the top of the Common.php file:

# The Custom.php file will not publish automatically. Has to be manually
# published to server.
# MWR, 8/26/08.
include(RelativePath . "/Custom.php");
idh63

Posts: 76
Posted: 09/22/2008, 6:03 AM

Hi datadoit,

Thanks for the reply. I to have a couple of goodies files.

So you are saying to add the include after the opening tag?
  
<?php  
include(RelativePath . "/myfolder/mycustomfile.php");    <<<<<<<<<<  
//Include Files @0-ED610940  
include(RelativePath . "/Classes.php");  
include(RelativePath . "/db_adapter.php");  
//End Include Files  
  
//Connection Settings @0-01AF3943  
$CCConnectionSettings = array (  
{/code]  
  
 
                   
View profile  Send private message
datadoit
Posted: 09/22/2008, 12:01 PM

Oui
idh63

Posts: 76
Posted: 09/22/2008, 12:49 PM

Does Oui mean yes? ;-)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.