PHP.Core.ScriptContext.Friend Function IncludeScript

Discussion about the open-source Phalanger [?] project.

PHP.Core.ScriptContext.Friend Function IncludeScript

Postby spide112 » February 24th, 2015, 4:21 pm

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!
spide112
 
Posts: 2
Joined: February 24th, 2015, 4:18 pm

Re: PHP.Core.ScriptContext.Friend Function IncludeScript

Postby Jakub Misek » February 24th, 2015, 4:36 pm

IncludeScript is internal function (friend in VB). Use Include instead.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: PHP.Core.ScriptContext.Friend Function IncludeScript

Postby spide112 » February 24th, 2015, 5:25 pm

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'
spide112
 
Posts: 2
Joined: February 24th, 2015, 4:18 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 15 guests

cron

User Control Panel

Login

Who is online

In total there are 15 users online :: 0 registered, 0 hidden and 15 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 15 guests