Re: PHP from CD-ROM (or: javascript on CD-ROM)
| From: | Chris Hayes | Date: | Fri, 08 Dec 2000 00:24:58 +0000 |
| Subject: | Re: PHP from CD-ROM (or: javascript on CD-ROM) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29361@lists.php.net to get a copy of this message | ||
Date sent: Tue, 05 Dec 2000 12:35:47 -0500
To: php-general@lists.php.net
From: Les Neste <lesneste@atlnewmedia.com>
Subject: PHP from CD-ROM
> I'm running a web site where I also want to be able to deliver a version on
> CD-ROM. The live web site contains links to PHP files, which obviously won't
> work if the end user is accessing the CD-ROM from their home computer. Right
> now, if the user clicks a link to a .php served from the CD, the browser
> fills the window with PHP source -- obviously not the best solution.
>
> Yes, I could produce a version which does not use PHP -- the links instead go
> to pages that say 'you have to be online to use this'. However, I don't want
> to get into multiple versions if I don't have to.
>
> I'm going to check out Javascript to see if there's a way to differentiate
> the cases. Has anyone come up with a better solution for this?
hi Les,
i don't understand what you want to differentiate but it's just that if you
are going to use javascript on CD you will encounter one or two problems:
- MS IE 3 wouldn't pass on the file.html?var=something to the next page when
you were offline. Horrible! I don't know whether or not this is fixed with
newer versions. My workaround was to put it all in frames, put the variables
somewehere in the parent page and refer to that page from frames and child
windows, like opener.parent.parent.framename.varname .
- the path of a CD-rom is not always D:. And for some links in javascript I
found a FULL path is required. I've got a script reading the proper base URL
for you.
good luck and if you are interested in my scripts let me know. I don't read
every mesage on this group though.
Chris
--------------------------------------------------------------------
-- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands --
--------------------------------------------------------------------