Connecting Tech Pros Worldwide Help | Site Map

Getting contradictory messages.

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 05:43 AM
Allan Topp
Guest
 
Posts: n/a
Default 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



  #2  
Old July 17th, 2005, 05:43 AM
Garp
Guest
 
Posts: n/a
Default Re: Getting contradictory messages.


"Allan Topp" <ad707@freenet.carleton.ca> wrote in message
news:ca7g5h$jei$1@freenet9.carleton.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


  #3  
Old July 17th, 2005, 05:43 AM
Justin Koivisto
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.