dudeks Posted May 30, 2015 Share Posted May 30, 2015 Hello. How to use local php files in web browsers? .php extension is not allowed in meta.xml file, is other way to use it? Need to be local for executing events from browser in client. Link to comment
dudeks Posted May 30, 2015 Author Share Posted May 30, 2015 Nope, it's not it. I mean using local .php files in CEF, now we can use .html files only. Link to comment
Mr.unpredictable. Posted May 30, 2015 Share Posted May 30, 2015 Nope, it's not it.I mean using local .php files in CEF, now we can use .html files only. No you can't do that. The only thing which you can do is fetchRemote and callRemote Link to comment
dudeks Posted May 30, 2015 Author Share Posted May 30, 2015 So... Due to update with CEF We need to change it. What you think about it? Link to comment
Jusonex Posted May 31, 2015 Share Posted May 31, 2015 The PHP interpreter is running on the webserver and MTA as a client can thus not execute PHP. Instead, you can use Javascript to execute an event: HTML/Javascript: <script> function executeMyEvent() { // Execute MTA event mta.triggerEvent("myEvent", 1, 2, 3) end </script> <a onclick="executeMyEvent()">Click to trigger the event</a> Lua: addEvent("myEvent") addEventHandler("myEvent", myBrowser, function(a, b, c) -- The following line outputs "1, 2, 3" to the chat outputChatBox(string.format("%d, %d, %d", a, b, c)) end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now