Getting contradictory messages.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Allan Topp

    Getting contradictory messages.

    I know little to nothing about PHP and need to clarify something before
    committing to learning it.

    From what I have heard PHP would be ideal to interrogate a database and
    populate HTML tables with found data (text AND URL's).

    However, what I want to do is to have the files on a CD rather than a web
    site.

    One colleague assures me that having PHP run on my machine is not a problem.
    Another says absolutely not, PHP is server based.

    So, my question is can PHP be run locally to access data and web pages on a
    CD? And a follow up is, can PHP (also?) be installed ON the CD and be able
    to run on any PC that had a compatible browser?

    Appreciate your feedback.

    Allan


  • Garp

    #2
    Re: Getting contradictory messages.


    "Allan Topp" <ad707@freenet. carleton.ca> wrote in message
    news:ca7g5h$jei $1@freenet9.car leton.ca...[color=blue]
    > I know little to nothing about PHP and need to clarify something before
    > committing to learning it.
    >
    > From what I have heard PHP would be ideal to interrogate a database and
    > populate HTML tables with found data (text AND URL's).
    >
    > However, what I want to do is to have the files on a CD rather than a web
    > site.
    >
    > One colleague assures me that having PHP run on my machine is not a[/color]
    problem.[color=blue]
    > Another says absolutely not, PHP is server based.
    >
    > So, my question is can PHP be run locally to access data and web pages on[/color]
    a[color=blue]
    > CD? And a follow up is, can PHP (also?) be installed ON the CD and be[/color]
    able[color=blue]
    > to run on any PC that had a compatible browser?
    >
    > Appreciate your feedback.
    >
    > Allan[/color]

    You certainly can do both - the best way to prove it is to install it and go
    through the tutorials.

    I use PHP to do filtered backups (copies of databases from machines without
    backup facilities to ones that have them), executed on schedules overnight.
    These run as "php.exe -f script.php" (the -f prevents the default headers
    being produced), not a web server in sight. I also do database accesses in
    standalone report generators (producing noddy HTML files for servers that
    don't have PHP on).

    It's actually slightly more work to get PHP to work as a web server's script
    engine, so it's by no means the default installation.

    As far as accessing the CD, the file() function (and all other IO functions)
    will happily access files there. Give it a try, you'll never look back. It's
    a powerful general-purpose tool, don't be allowed to pigeon-hole it as
    server-side scripting only. Maybe we should get the name changed. 8)

    Garp


    Comment

    • Justin Koivisto

      #3
      Re: Getting contradictory messages.

      Allan Topp wrote:
      [color=blue]
      > I know little to nothing about PHP and need to clarify something before
      > committing to learning it.
      >
      > From what I have heard PHP would be ideal to interrogate a database and
      > populate HTML tables with found data (text AND URL's).
      >
      > However, what I want to do is to have the files on a CD rather than a web
      > site.
      >
      > One colleague assures me that having PHP run on my machine is not a problem.
      > Another says absolutely not, PHP is server based.
      >
      > So, my question is can PHP be run locally to access data and web pages on a
      > CD? And a follow up is, can PHP (also?) be installed ON the CD and be able
      > to run on any PC that had a compatible browser?[/color]

      OK, I have yet to delve into the stand alone application possibilities
      of PHP. However, you may want to look into the roadsend compiler
      (http://www.roadsend.com/) and PHP-GTK (http://gtk.php.net/). I would
      assume that there will be some idiosyncrasies for each compared to what
      you'd experience for web scripting.

      Depending on where the database is, what type it is, etc., you may also
      encounter other issues with connecting to the database on the client
      machine (for instance, their computer doesn't have the correct ODBC
      drivers, is behind a strict firewall, etc.).

      If you're a quick study with programming languages like C/C++, Java,
      Real Basic or Visual Basic, maybe something like that would better suit
      your needs.

      On the other hand, if you simply want the resulting HTML pages on CD
      (IOW the data would NOT be updated realtime through the app), then you
      can simply have PHP write out the HTML pages for you to burn to disk.

      --
      Justin Koivisto - spam@koivi.com
      PHP POSTERS: Please use comp.lang.php for PHP related questions,
      alt.php* groups are not recommended.

      Comment

      Working...