CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 HOWTO External Code & Programs ?

Print topic Send  topic

Author Message
mcapelati

Posts: 17
Posted: 03/26/2009, 1:26 PM

Hi there,

Is there a better way to insert an external program, with Functions and Classes (library), into CodeCharge? So, the CodeCharge could manage it ?

I mean, if I write some programs, containing general function (example: dates validation, sending mails, pdf generation, and so on) and just put them in some place/directory, I have to remember to copy (and update) that program every time a make some change on it, in every place/project I have use it. All that in "manually" way, with manual controls... So, if I forgott to update some project, it could be a problem!

But, instead, If I tell to CodeCharge to manage that file, I dont have to worry about that.

See: this program should be external and some kind of directory-independent, because I could use it in different CodeCharge projects. Imagine to have a "./common" directory, shared by many different projects.

Another question is: where is the right place to call ("include") those external programs?
Actually, I am doing it inserting "include" lines on the MAIN program, but I think this is not the best way to do it. Seems that, if i do it, CodeCharge loose some control and delete my code.

Regards,
=Marcello Capelati=
_________________
=Marcello Capelati=
View profile  Send private message
melvyn


Posts: 333
Posted: 03/26/2009, 2:24 PM

I do it placing it in Common.php, first line:
  
<?php  
include("Functions.php");  // My custom functions.  
  
//Include Files @0-ED610940  
include(RelativePath . "/Classes.php");  
include(RelativePath . "/db_adapter.php");  
//End Include Files  
  
//Connection Settings @0-AFE0FDB3  
$CCConnectionSettings = array (  
...  

In this way I can use them from everyplace. So when I go into some event I only use a line inside that event:
  
//Custom Code @129-2A29BDB7  
// -------------------------  
    showCustomersForms($Container);  
// -------------------------  
//End Custom Code  

You can write in Common using ONLY those white lines. Don't modify the gray area.


_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
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.