can you use an include statement (PhpClr option)

Aug 11, 2008 at 2:02 AM
I saw this posting a while back.
Is it possible to do this yet.
This is a fantastic product but I need to be able to use the
Import namespace
along with
include('xxx')

Maybe that is a compatibility issue?

Ron




I have a web app that is using static includes, such as:

<?php include('topNav.php'); ?>

Any time I try to access these pages I get the following error:

"Operation is not valid due to the current state of the object."

Stack Trace:

InvalidOperationException: Operation is not valid due to the current state of the object.
PHP.Core.ScriptContext.SearchForIncludedFile(PhpError errorSeverity, String includedPath, FullPath includerFullPath) +803
PHP.Core.ScriptContext.DynamicInclude(String includedFilePath, String includerFileRelPath, Dictionary`2 variables, DObject self, DTypeDesc includer, InclusionTypes inclusionType) +241
<Script>.<Main>(ScriptContext <context>, Dictionary`2 <locals>, DObject , DTypeDesc , Boolean ) in C:\Documents and Settings\davoffice\My Documents\Visual Studio 2008\WebSites\WebSite1\index.php:19

TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +371
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
PHP.Core.PhpFunctionUtils.Invoke(MethodInfo method, Object target, Object[] args) +128
PHP.Core.PhpScript.InvokeMainHelper(Type script, ScriptContext context, Dictionary`2 variables, DObject self, DTypeDesc includer, Boolean isMain) +145
PHP.Core.ScriptContext.<IncludeScript>b__0(Object scriptType) +51
PHP.Core.ScriptContext.GuardedCall(Action routine, Object data, Boolean allowUserExceptions) +273

PhpNetInternalException: Guarded call
PHP.Core.ScriptContext.GuardedCall(Action routine, Object data, Boolean allowUserExceptions) +419
PHP.Core.ScriptContext.IncludeScript(String relativeSourcePath, Type type) +363
PHP.Core.RequestContext.IncludeScript(String relativeSourcePath, Type type) +22
PHP.Core.RequestHandler.ProcessRequest(HttpContext context) +292
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64