Where should the php files be placed?
4 posts
• Page 1 of 1
Where should the php files be placed?
I have my question posted on SO as well which has a few images to show how my project is setup and the errors Im getting (http://stackoverflow.com/questions/1290 ... hp-classes). However my question should be generic enough to not necessarily need that stuff.
Im following the latest tutorial ".NET interoperability overview of Phalanger 3.0" at http://www.php-compiler.net/blog/2012/n ... langer-3-0
But
dynamic x = globals.@class.<CLASSNAME>(args);
does not find my php classes.
I have tried with my own php classes as well as the default.php which comes with the sample located at the link above.
Where should the php files be put, and are there any addition settings in VB that need to be set?
Im following the latest tutorial ".NET interoperability overview of Phalanger 3.0" at http://www.php-compiler.net/blog/2012/n ... langer-3-0
But
dynamic x = globals.@class.<CLASSNAME>(args);
does not find my php classes.
I have tried with my own php classes as well as the default.php which comes with the sample located at the link above.
Where should the php files be put, and are there any addition settings in VB that need to be set?
- owengerig
- Posts: 10
- Joined: October 16th, 2012, 2:50 pm
Re: Where should the php files be placed?
You have to include your php files into the PHP context first ...
In Web App, to 'simulate' php lifecycle properly, do following:
In Web App, to 'simulate' php lifecycle properly, do following:
- Code: Select all
using (var request_context = RequestContext.Initialize(ApplicationContext.Default, HttpContext.Current))
{
var context = request_context.ScriptContext;
context.Include("default.php", false);
// now the declarations declared by default.php are available in context.
// do anything with PHP objects here
}
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Where should the php files be placed?
Thanks again for the help. This did work
- owengerig
- Posts: 10
- Joined: October 16th, 2012, 2:50 pm
Re: Where should the php files be placed?
No problem. Keep asking
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests