By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,348 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,348 IT Pros & Developers. It's quick & easy.

Getting contradictory messages.

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Allan Topp" <ad***@freenet.carleton.ca> wrote in message
news:ca**********@freenet9.carleton.ca...
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


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
Jul 17 '05 #2

P: n/a
Allan Topp wrote:
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?


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 - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.