Re: RE: [PHP] webmail

2001-07-09 Thread olsonric

In addition, here's a POP3 class from the PHP Classes Repository...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re: [PHP]need an opinion on this idea of mine...!!

2001-07-09 Thread olsonric

In a nutshell, you've just described the 'fusebox' method.  Originated 
under Cold Fusion, there are
movements to port this style to PHP and ASP, and probably other platforms.  

It's not bad, but personally, I think it's a bit weak in some cases - 
we've taken it a step further in house,
but the idea is similar.

fusebox.org has more info on this style.

Okay, what's weak about it?  I've long pondered this question myself.  I have a 
modular script and I've debated between having a big switch statement on the index 
calling functions that are declared in include files... or splitting the switch 
statement into each include file with it.

Overall though, this approach has worked well for me.  But, in my limited scripting 
experience, I may be missing some pros and cons on it.  I'm still figuring out the 
best way to lay out my functions and such.  

PHPBuilder has an article about web box, a PHP implementation of fusebox:  
http://www.phpbuilder.com/columns/bill19990831.php3

rick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] line breaks lost in XSL transformation

2001-07-09 Thread olsonric

I've started experimenting with XML, by having my blogging script output the news to 
XML [http://php.techno-weenie.com/supasite/xml/supa.xml].  I've tried transforming it 
with an XSL stylesheet [http://php.techno-weenie.com/supasite/test.xsl] to get this 
output [http://php.techno-weenie.com/supasite/transform.php].  It looks great, but the 
source code looks really bad.  It looks like it's stripping all the carriage returns 
when it starts matching the news templates.  Does anyone know how to get these back?  
I like to keep my HTML looking at least a little readable, even if the only parts I 
directly edit are the XML and XSL files... 

Here's the source of the PHP script I use:


class xsl {

var $xsl_content;
var $xml_content;
var $result;

function xsl($xml, $xsl) {
  ### open XML and XSL files ###
  $xml_handle = fopen($xml, r) or die(Can't open XML file);
  $xsl_handle = fopen($xsl, r) or die(Can't open XSL file);

  ### get the contents ###
  $this-xml_content = fread($xml_handle, filesize($xml));
  $this-xsl_content = fread($xsl_handle, filesize($xsl));

  ### process files ###
  $handle = xslt_create() or die(Can't create XSLT handle.);
  xslt_process($this-xsl_content, $this-xml_content, $this-result); 

  ### add HTML content to the results ###
  $this-result = str_replace(, , $this-result);
  $this-result = str_replace(, , $this-result);
  @xslt_free($handle);
} # end constructor function
} # end class

$xslt = new xsl(xml/supa.xml, test.xsl);

echo $xslt-result;
-

any assistance would be greatly appreciated

rick
http://techno-weenie.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]