Error ! Inclusions are not allowed in the pure unit !
4 posts
• Page 1 of 1
Error ! Inclusions are not allowed in the pure unit !
Hello;
i can solve my past problem in CURL thank you of Jakub Misek
but a new problem for me
when i use of INCLUDES why don't work standard methods ?
my example of includes are :
simple : include_once 'myclass.php'; or simple : include 'myclass.php';
or include_once dirname(__FILE__).'/methods/method_base.php';
give me : Error 3 Inclusions are not allowed in the pure unit.
how i can fix this problem ?
Thank you for your helps
i can solve my past problem in CURL thank you of Jakub Misek
but a new problem for me
when i use of INCLUDES why don't work standard methods ?
my example of includes are :
simple : include_once 'myclass.php'; or simple : include 'myclass.php';
or include_once dirname(__FILE__).'/methods/method_base.php';
give me : Error 3 Inclusions are not allowed in the pure unit.
how i can fix this problem ?
Thank you for your helps
- Kamb!z
- Posts: 3
- Joined: May 22nd, 2013, 8:58 am
Re: Error ! Inclusions are not allowed in the pure unit !
Hi,
'Pure' mode corresponds to C# compilation mode - all the files are as one, you can only code classes, all of them are defined instantly in your program, and inclusions are not necessary.
If you are targeting normal PHP mode, where you have to include files etc., change the compilation mode to 'Standard'
For more information see http://wiki.php-compiler.net/Pure_mode
Thanks,
'Pure' mode corresponds to C# compilation mode - all the files are as one, you can only code classes, all of them are defined instantly in your program, and inclusions are not necessary.
If you are targeting normal PHP mode, where you have to include files etc., change the compilation mode to 'Standard'
For more information see http://wiki.php-compiler.net/Pure_mode
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Error ! Inclusions are not allowed in the pure unit !
Jakub Misek wrote:Hi,
'Pure' mode corresponds to C# compilation mode - all the files are as one, you can only code classes, all of them are defined instantly in your program, and inclusions are not necessary.
If you are targeting normal PHP mode, where you have to include files etc., change the compilation mode to 'Standard'
For more information see http://wiki.php-compiler.net/Pure_mode
Thanks,
Sorry i can't understand ! in Standard mode php compiler is standard but i cannot access to Class and function on PHP ! how i can create new instant of PHP Standard mode clases into on my .net c# project?
- Kamb!z
- Posts: 3
- Joined: May 22nd, 2013, 8:58 am
Re: Error ! Inclusions are not allowed in the pure unit !
To use standard PHP code from C#, compile PHP in standard mode, and use PHP.Core.ScriptContext API. Of course Pure mode lets you much easier interoperability options, you are just limited with inclusions and global code.
More e.g. at http://www.php-compiler.net/blog/2012/n ... langer-3-0
More e.g. at http://www.php-compiler.net/blog/2012/n ... langer-3-0
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 6 guests