usabrad86 Posted November 29, 2010 Posted November 29, 2010 (edited) well im going somewhere with this i think...trying to parse php scriptsi got it to post in scite debug consoleput i cant grab the data out of the debugscript form within the scriptindex.php<?php echo "Hello !World!"; ?>parse.au3$pid = _PHPRun("index.php") While 1 Sleep(250) WEnd Func _PHPRun($File) $ret = DllCall("Kernel32.dll", "hwnd", "AllocConsole") Return Run(@ScriptDir & "\php\php.exe " & $File, @ScriptDir) EndFunc Edited November 29, 2010 by usabrad86
Robjong Posted November 30, 2010 Posted November 30, 2010 (edited) Hey, This should get you started. #cs Use the php.exe to parse php files. More about the usage of the php commandline: http://www.php.net/manual/en/features.commandline.php http://www.php.net/manual/en/features.commandline.usage.php http://www.php.net/manual/en/features.commandline.options.php Make sure the following files are in the $PHP_DIR: php.exe php.ini php5ts.dll #ce Global Const $PHP_DIR = @ScriptDir & "\php" ; path to the folder with the php files Global $phpScriptFile = @ScriptDir & "\scripts\foo_script.php" ; the script file to be parsed Global $phpOutputFile = @TempDir & "\output.html" ; the file to write the output of the php script to ; parse the PHP file RunWait(@ComSpec & " /c " & FileGetShortName($PHP_DIR & "\php.exe") & _ ; php.exe " -c " & FileGetShortName($PHP_DIR & "\php.ini") & _ ; php.ini to use " -f " & FileGetShortName($phpScriptFile) & " >" & _ ; script to parse FileGetShortName($phpOutputFile), "", @SW_HIDE) ; output file ; output MsgBox(262144, "phpParseFile", FileRead($phpOutputFile)) edit: added some more comments Edited November 30, 2010 by Robjong
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