CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Adding an additional common file

Print topic Send  topic

Author Message
p3ptools

Posts: 19
Posted: 04/17/2004, 9:41 AM

Hello,
I really starting to get up to speed with CCS now, and
am in the middle of constructing a production system
manager to interface to a product line being sold via
the xcart shopping cart.

xcart tends to store information in a particular fashion, for example some data is blowfish encrypted before being
stored other pieces are serialized.

Consequently I,m finding myself using more and more functions defined in xcarts central function library.

Rather than recopy these functions is it possible to just add the
func.php library as a common file?

I have Code Charge Studio 2.2.3.60

Are there any other mechanisms I can use to emulate
a globally included library file?

Thanks Stephen


_________________
Sometimes the complaints will be false...
View profile  Send private message
Don Safar
Posted: 04/17/2004, 9:47 AM

Just add an include statement at the end of your common file (in the white
space right before the "?>" tag) like this
include( "PathToFile/func.php" ); //replace PathToFile with the location
of func.php

Every page will then have access to the functions.

"p3ptools" <p3ptools@forum.codecharge> wrote in message
news:540815e241a110@news.codecharge.com...
> Hello,
> I really starting to get up to speed with CCS now, and
> am in the middle of constructing a production system
> manager to interface to a product line being sold via
> the xcart shopping cart.
>
> xcart tends to store information in a particular fashion, for example some
data
> is blowfish encrypted before being
> stored other pieces are serialized.
>
> Consequently I,m finding myself using more and more functions defined in
xcarts
> central function library.
>
> Rather than recopy these functions is it possible to just add the
> func.php library as a common file?
>
> I have Code Charge Studio 2.2.3.60
>
> Are there any other mechanisms I can use to emulate
> a globally included library file?
>
> Thanks Stephen
>
>
> _________________
> Sometimes the complaints will be false...
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 04/17/2004, 12:06 PM

Stephen,
Yes, you can modify Common.php or any of the generated programs by adding the PHP include statement, for example:
include(RelativePath . "/func.php.php");

I recommend adding such statements as the 2nd line of the generated programs, directly below "<?php", or in the white-background area below "//End Include Files". Only avoid modifying code within the grey-background area, as this is generated code that may need to re-generated differently in future versions of CCS.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
p3ptools

Posts: 19
Posted: 04/17/2004, 4:25 PM

Hi,
thanks thats a good solution.

Stephen
_________________
Sometimes the complaints will be false...
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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