Crossing from PHP (and HTML) to C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stevish
    New Member
    • Feb 2008
    • 2

    #1

    Crossing from PHP (and HTML) to C++

    Hello! My name is Steve. I have been playing around in PHP for about 3 years now, and have become proficient enough to make a few pretty cool scripts to do very tedious tasks.

    My problem is that now I want to be able to access some (ok, one) of those scripts without being online (because I'm not sure if my scripts are secure, and don't want them available to the public on my server).

    The first thing I tried to do was compile my php scripts into an exe file using several different programs. Once I finally got all that figured out, I discovered that you can't use any HTML... just PHP. Well, all of my scripts are heavily reliant on HTML for little things like user input and basic formatting. So there is no way I could just alter the code slightly to get rid of the HTML.

    The solution, as far as I can tell, is to learn C++, since I've heard it's very similar to php. I've spent the last half hour or so looking on Google for a list of commands in php and how to write them in C++, or something to that effect, but I can't find anything like that. Can anyone here point me to a useful tool for converting my php/html script into a c++ program?
  • Stevish
    New Member
    • Feb 2008
    • 2

    #2
    Ok, I'm a bumper... so sue me. :)

    Comment

    • oler1s
      Recognized Expert Contributor
      • Aug 2007
      • 671

      #3
      My problem is that now I want to be able to access some (ok, one) of those scripts without being online
      Not very difficult. You just need to run a server with PHP installed on your local computer, and then run your scripts through the local server. An Apache + PHP setup is pretty easy to do, but made easier by a number of prepackaged and configured setups like WAMP, XAMPP, EasyPHP, and so on.

      The first thing I tried to do was compile my php scripts into an exe file using several different programs.
      Bad idea. PHP lives through the web server. Outside of that niche, it is very limited. Now, you know to run a local webserver instead.

      The solution, as far as I can tell, is to learn C++, since I've heard it's very similar to php.
      No. C++ is not similar to PHP at all. A better relationship might be that PHP is written in C++.

      Comment

      Working...