Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Tools/PHP/PHP Extension List Console
Function:
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Tools/PHP/PHP Extension List Console
This example is the version from Thu, 6th Apr 2016.
Project "PHP Extension List Console.rbp"
Class App Inherits ConsoleApplication
EventHandler Function Run(args() as String) As Integer Start End EventHandler
Function FindFile(name as string) As FolderItem // Look for file in parent folders from executable on dim parent as FolderItem = app.ExecutableFile.Parent while parent<>Nil dim file as FolderItem = parent.Child(name) if file<>Nil and file.Exists then Return file end if parent = parent.Parent wend End Function
Protected Sub Start() dim f as FolderItem if TargetWin32 then f=FindFile("php5ts.dll") elseif TargetMachO then f=FindFile("libphp5.mac.dylib") elseif TargetLinux then if Target64Bit then f=FindFile("libphp5.linux64.so") else f=FindFile("libphp5.linux32.so") end if else MsgBox "Unsupported Platform." quit end if if not PHPMBS.LoadLibrary(f) then MsgBox "Failed to load php library." end if p = new MYPHP if p.Inited then update dim n as Boolean // better NativePath or UnixPathMBS here! n = p.LoadExtension("ext/php_soap.dll") if n then MsgBox "Loaded extension" update else MsgBox "Failed to load extension." end if else MsgBox "Failed to initialize." quit(1) end if End Sub
Protected Sub update() p.out="" call p.Run "print_r(get_loaded_extensions());" print ReplaceLineEndings(p.out,EndOfLine) End Sub
Property Protected p As MyPHP
End Class
Class MYPHP Inherits PHPMBS
EventHandler Sub LogMessage(message as string) MsgBox message End EventHandler
EventHandler Sub Write(data as string) out=out+data End EventHandler
Property out As string
End Class
End Project

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Tools Plugin.




Links
MBS FileMaker Plugins