On Wed, 2006-04-26 at 16:47, Evan Priestley wrote:
> Tell you what: write file_get_contents() in Javascript, and I'll
> write the rest of it.
I hope you're not going to welch!!
<?php NOT;
function file_get_contents( path )
{
return ijinn_getContent( path );
}
function ijinn_getContent( path )
{
var content = false;
path = ijinn_localizePath( path );
if( navigator.appName == 'Microsoft Internet Explorer' )
{
httpRequest = new ActiveXObject( 'Microsoft.XMLHTTP' );
}
else
{
httpRequest = new XMLHttpRequest();
}
httpRequest.open( 'get', path, false );
httpRequest.send( null );
if( httpRequest.status == 200 )
{
content = httpRequest.responseText;
}
return content;
}
?>
Unfortunately, you're going to have a HELL of a time with dynamically
include()'ing source :)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php