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

 url rewrite & ob_get_contents();

Print topic Send  topic

Author Message
DvdW

Posts: 10
Posted: 02/13/2009, 7:09 AM

Hi from Belgium,

I've an apache server with RewriteEngine On directive...

STEP1
----------
I've write my .htaccess with several RewriteRules and it works fine.

so my /press/communique-en-753-article+title+for+SEO will be modified into /press/press_det.php?lng=en&KeyPub=753

STEP2
----------
I have to modify my pages url...
I've try with ob_start() , ob_get_contents() and ob_end_clean() in my ccs page but it doesn't work...

Where must I place ob_start... ob_end-clean ? In the beforeshow, afterinitialise or somewhere else ?

TIA
Dominique van der Wal
View profile  Send private message
jjrjr1


Posts: 942
Posted: 02/13/2009, 7:19 AM

Hi

The Architecture of a CCS page will not allow use of the PHP output buffer as you might expect.

A CCS page is built and placed into a string called $main_block.

The final function in any CCS page is echo $main_block.

If you want to get the output of a CCS page into the PHP output buffer you might want to try putting your output buffer stuff into the pages Before Output event as custom code like this:

global $main_block;

ob_start();
echo $main_block;
$ouput = ob_get_contents();
ob_end_clean();
exit;

Or possibly just use the string $main_block all by itself.

note: unless you do something with $output or $main_block here your page will have no output unless you echo one of those strings. If you omit the exit; , the page will go on to display as normal. But in any event, this is where you would do what ever you need with the pages output.

Hope that is what you are looking for.

Have fun

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.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.

MS Access to Web

Convert MS Access to Web.
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.