-
August 9th, 2016, 10:45 AM
#1
configuration in a php file
hello forum,
going through the source of an application I found online, I notice the programmer placed the configuration file of the application in a .php file obviously written in php...
the whole winapi code is written in c++ but the configuration was writting in php... this is the snippet
Code:
$commandLineOptions['client']['win32'] = array
(
'name' => 'client32.bin',
'subsys' => 'WINDOWS',
'cpp_options' => '/D "SECURITY_WIN32" /I "'.$dir['source']['common'].'"',
'lnk_options' => '/ENTRY:CoreIn::_entryPoint /MERGE:.rdata=.text /FIXED:NO kernel32.lib user32.lib advapi32.lib shlwapi.lib shell32.lib secur32.lib psapi.lib ole32.lib gdi32.lib comctl32.lib ws2_32.lib crypt32.lib wininet.lib lde32.lib msxml2.lib oleaut32.lib netapi32.lib userenv.lib comdlg32.lib mpr.lib uuid.lib'
);
notice the lnk_options'=>'/ENTRY:
so the question is, why will the programmer do something like that instead of specifying it directly in visual studio line options? In what case scenarious are these things done or needed? Of course seeing php what comes to mind first is "server"...but I just can't fathom where this comes in...
someone shed some light...
-
August 10th, 2016, 03:11 AM
#2
Re: configuration in a php file
Originally Posted by TheLionKing
so the question is, why will the programmer do something like that instead of specifying it directly in visual studio line options?
This is VC++ compiler options passed to cl.exe properly. You can build a binary with a single command line like this:
Code:
cl.exe %SOURCE_FILES% %CPP_OPTIONS% /link /out:%NAME% /subsystem:%SUBSYS% %LINK_OPTIONS%
And why would programmer do something like that was up to programmer himself. Definitely he builds something on web server side where cl.exe is in the path.
Last edited by Igor Vartanov; August 10th, 2016 at 03:14 AM.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|