Is it possible to display (and process the php code) in a simple Win32 app? NOT MFC!!! i know mfc can handle html, but i want some dynamic pages. If so, how is this done? hopefully pure Win32 API if possible.
Thanks
Printable View
Is it possible to display (and process the php code) in a simple Win32 app? NOT MFC!!! i know mfc can handle html, but i want some dynamic pages. If so, how is this done? hopefully pure Win32 API if possible.
Thanks
Why not MFC?
If you have a legacy app (in WIN32) just put the MFC code into a DLL and call from the WIN32 app.
Displaying alone (as in a source editor) is very simple to do in Win32. However, you will need to install a php-enabled web server (Apache) to process php code.
Or call the PHP command line processor.
"Emulates"? It just installs and manages them, just like XAMPP.
What i mean is... how can i turn my win32 app into a web browser that supports php? I know it wont be easy
Sure will be.
That's the gist of it. Unless you find a way to embed a PHP interpreter in your app (not sure if that's supported), there's not even really another way to do it. Of course, the various server variables are not available to the PHP script, but then, it's not running on a server.Code:contents = get file contents of filename
if filename ends with .php:
contents = process(contents)
function process:
write contents to tempfile
return output of command `php tempfile`
Search for popen(). That's the core element of it.
all of this seems too complicated, so i decided to move to mfc. I tried downloading ms vc++ 6.0 but when i run setup.exe it just hangs. Then it says my system doesnt have enough registry space, asks me if i would like to create more, i say yes, it says it's rebooting and on reboot it just doesnt work saying that the installation could not create more space. Does anyone have an MS visual c++ 6.0 download somewhere?
I need to use msvc++ 6.0 because i dont know how to create an MFC app with VS express.
You can't with Express. MFC is only distributed with the versions that cost.
VC++6 cannot be legally downloaded, so you shouldn't ask on this board about it. You could browse a bookshop, though - some old books come with the educational version of VC++6 on a CD.
Not that I'd recommend the program. It's completely outdated.
I think that
a) your plans are too ambitious for a relative newcomer to C++.
b) MFC wouldn't help you at all in processing PHP. Displaying HTML is a different question, but one that doesn't touch this discussion.
c) you should consider alternatives to MFC, like wxWidgets or GTK+. I know that GTK has a HTML display component, and I think wx has one, too.
d) I still don't understand why you would want what you're doing in the first place. If you want to test PHP code, install a local server environment.
You could work out how to run CGI programs and use the PHP fastCGI build.
What for? Are you writing a PHP IDE?