Page 1 of 1

PHP.Core.ScriptContext.Friend Function IncludeScript

PostPosted: February 24th, 2015, 4:21 pm
by spide112
I have just find out about this project. COOL all the way !
I user VB.NET and i try to call function as you did in your tutorial.
I user MVS 2008 .net 2.0 and i get :

Error 1 'PHP.Core.ScriptContext.Friend Function IncludeScript(relativeSourcePath As String, script As PHP.Core.ScriptInfo) As Object' is not accessible in this context because it is 'Friend'. C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WindowsApplication3\WindowsApplication3\Form1.vb 16 9 WindowsApplication3

My code is :

Dim context As ScriptContext = ScriptContext.CurrentContext
context.Output = Console.Out
Dim library_representative As Type = GetType(ClassLibrary)
context.IncludeScript("Library.php", library_representative)
context.[Call]("f")

Am I doing something wrong ? Thanks in advance!

Re: PHP.Core.ScriptContext.Friend Function IncludeScript

PostPosted: February 24th, 2015, 4:36 pm
by Jakub Misek
IncludeScript is internal function (friend in VB). Use Include instead.

Re: PHP.Core.ScriptContext.Friend Function IncludeScript

PostPosted: February 24th, 2015, 5:25 pm
by spide112
changed to this :
Dim context As ScriptContext = ScriptContext.CurrentContext
context.Output = Console.Out
Dim library_representative As Type = GetType(ClassLibrary)
context.Include("Library.php", False)
context.[Call]("f")
And got this :
Script 'Library.php' inclusion failed. Cause: Script cannot be included with current configuration. Search paths: include_path is '.', working directory is 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WindowsApplication3\WindowsApplication3\bin\Debug'