Subversion Repositories fastphp

Rev

Rev 25 | Rev 42 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25 Rev 33
Line 8... Line 8...
8
const
8
const
9
  FASTPHP_GOTO_URI_PREFIX = 'fastphp://editor/gotoline/';
9
  FASTPHP_GOTO_URI_PREFIX = 'fastphp://editor/gotoline/';
10
 
10
 
11
function FastPHPConfig: TMemIniFile;
11
function FastPHPConfig: TMemIniFile;
12
function GetPHPExe: string;
12
function GetPHPExe: string;
13
function RunPHPScript(APHPFileName: string): string;
13
function RunPHPScript(APHPFileName: string; lint: boolean=false): string;
14
function ParseCHM(const chmFile: TFileName): boolean;
14
function ParseCHM(const chmFile: TFileName): boolean;
15
function IsValidPHPExe(const exeFile: TFileName): boolean;
15
function IsValidPHPExe(const exeFile: TFileName): boolean;
16
 
16
 
17
implementation
17
implementation
18
 
18
 
Line 62... Line 62...
62
    FastPHPConfig.WriteString('Paths', 'PHPInterpreter', result);
62
    FastPHPConfig.WriteString('Paths', 'PHPInterpreter', result);
63
    FastPHPConfig.UpdateFile;
63
    FastPHPConfig.UpdateFile;
64
  end;
64
  end;
65
end;
65
end;
66
 
66
 
67
function RunPHPScript(APHPFileName: string): string;
67
function RunPHPScript(APHPFileName: string; lint: boolean=false): string;
68
var
68
var
69
  phpExe: string;
69
  phpExe: string;
70
begin
70
begin
71
  phpExe := GetPHPExe;
71
  phpExe := GetPHPExe;
72
  if phpExe = '' then Abort;
72
  if phpExe = '' then Abort;
-
 
73
  if lint then
-
 
74
    result := GetDosOutput('"'+phpExe+'" -l "'+APHPFileName+'"', ExtractFileDir(ParamStr(0)))
-
 
75
  else
73
  result := GetDosOutput('"'+phpExe+'" "'+APHPFileName+'"', ExtractFileDir(ParamStr(0)));
76
    result := GetDosOutput('"'+phpExe+'" "'+APHPFileName+'"', ExtractFileDir(ParamStr(0)));
74
end;
77
end;
75
 
78
 
76
function ParseCHM(const chmFile: TFileName): boolean;
79
function ParseCHM(const chmFile: TFileName): boolean;
77
var
80
var