Hyperlinking to PHP

G

garwil

Hi,

Am trying to hyperlink to a .php file however when I
click the hyperlink the FILE DOWNLOAD dialog box opens.
Why does this happen..can anyone fill me
in...Hyperlinking to another .html file is ok and does
not produce this download file thingy..

Rgds
 
R

Ronx

Running a .php page requires that the page is loaded on a server with PHP
installed, otherwise the page will be "unknown" and the download dialogue
presented.

Ron
 
G

garwil

Hi Ronx.
Many thanks for the reply

My situation is a follows.

I have a server installed on my pc (EasyPhp)wherein lies
both the HTML and PHP pages. I try and call the php page
from withing FP and I get this error. Secondly I thought
that a browser would display an html page before a php
one..do you know anything about this?
Thanks once again
 
R

Ronx

How have you opened the web in FrontPage? As a server-based web (example
http://localhost/webname/ ) or as a disc-based web , (example
c:\mywebs\webname )
If FP is opened as a disc-based web, then you are not using the server, and
therefore .php files will download, not run.

The order files will open depends on the configuration of the server
(assuming you are referring to which page [index.php or index.html ] opens
in response to a link such as http://example.com/ ).

In the configuration there is a list of acceptable default file names, the
name at the top of the list gets precedence over the rest.

Ron
 
G

garwil

Hi,
I have the server running (localhost)with all my php
stuff on it. I then developed a splash page -index.htm as
a WELCOME page. I linked it to the php page within the
localhost. Made some changes to the splash page and from
the PREVIEW pane in FP tried the hyperlink...system
wanted to download...I then moved the splash page
(index.htm) to localhost into the same folder as the php
pages and tried opening the website expecting the
Index.html splash page to open...not so..the index.php
opened instead...

Rgds
-----Original Message-----
How have you opened the web in FrontPage? As a server- based web (example
http://localhost/webname/ ) or as a disc-based web , (example
c:\mywebs\webname )
If FP is opened as a disc-based web, then you are not using the server, and
therefore .php files will download, not run.

The order files will open depends on the configuration of the server
(assuming you are referring to which page [index.php or index.html ] opens
in response to a link such as http://example.com/ ).

In the configuration there is a list of acceptable default file names, the
name at the top of the list gets precedence over the rest.

Ron
--
Reply only to group - emails will be deleted unread.


Hi Ronx.
Many thanks for the reply

My situation is a follows.

I have a server installed on my pc (EasyPhp)wherein lies
both the HTML and PHP pages. I try and call the php page
from withing FP and I get this error. Secondly I thought
that a browser would display an html page before a php
one..do you know anything about this?
Thanks once again
on
a server with PHP the
download dialogue in
message


.
 
R

Ronx

If you are using easyPHP as the server, then this is a variant of Apache.
Apache on Windows cannot be configured to use FrontPage extensions.
FrontPage cannot be used to edit files on a non-extended server.
Therefore you are opening the web in FrontPage as a disc based web.
You are opening a web before editing pages, aren't you?
If the above is incorrect, please detail the steps you take to edit the
index.htm page, starting with "Open FrontPage....

As I said before, unless you open a page on a server with PHP installed,
using a URL like http://domain/pagename, the .php page will download, not
run.
Previewing in FrontPage from a disc based web is not using the server,
unless the link clicked in a page being previewed is an absolute link of the
form http://domain/pagename

The reason the .php page opens instead of the index.html is because the
server has been set up that way. If you find the configuration file, named
httpd.conf (or something similar) in a subfolder of a folder named apache or
easyphp, the list of default file names can be edited. In Windows Explorer
search for Files or Folders containing text "DirectoryIndex"
In the file, look for DirectoryIndex, and change the list of pagenames to
suit your requirements.

Ron
--
Reply only to group - emails will be deleted unread.


Ronx said:
How have you opened the web in FrontPage? As a server-based web (example
http://localhost/webname/ ) or as a disc-based web , (example
c:\mywebs\webname )
If FP is opened as a disc-based web, then you are not using the server, and
therefore .php files will download, not run.

The order files will open depends on the configuration of the server
(assuming you are referring to which page [index.php or index.html ] opens
in response to a link such as http://example.com/ ).

In the configuration there is a list of acceptable default file names, the
name at the top of the list gets precedence over the rest.

Ron
--
Reply only to group - emails will be deleted unread.


garwil said:
Hi Ronx.
Many thanks for the reply

My situation is a follows.

I have a server installed on my pc (EasyPhp)wherein lies
both the HTML and PHP pages. I try and call the php page
from withing FP and I get this error. Secondly I thought
that a browser would display an html page before a php
one..do you know anything about this?
Thanks once again
 
T

Thomas A. Rowe

You have to access the page via http://localhost/pagename.php and in order do that you can't use the
Preview tab which loads the file from the FP Temp folder, you have use File Menu | Preview In
Browser.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


garwil said:
Hi,
I have the server running (localhost)with all my php
stuff on it. I then developed a splash page -index.htm as
a WELCOME page. I linked it to the php page within the
localhost. Made some changes to the splash page and from
the PREVIEW pane in FP tried the hyperlink...system
wanted to download...I then moved the splash page
(index.htm) to localhost into the same folder as the php
pages and tried opening the website expecting the
Index.html splash page to open...not so..the index.php
opened instead...

Rgds
-----Original Message-----
How have you opened the web in FrontPage? As a server- based web (example
http://localhost/webname/ ) or as a disc-based web , (example
c:\mywebs\webname )
If FP is opened as a disc-based web, then you are not using the server, and
therefore .php files will download, not run.

The order files will open depends on the configuration of the server
(assuming you are referring to which page [index.php or index.html ] opens
in response to a link such as http://example.com/ ).

In the configuration there is a list of acceptable default file names, the
name at the top of the list gets precedence over the rest.

Ron
--
Reply only to group - emails will be deleted unread.


Hi Ronx.
Many thanks for the reply

My situation is a follows.

I have a server installed on my pc (EasyPhp)wherein lies
both the HTML and PHP pages. I try and call the php page
from withing FP and I get this error. Secondly I thought
that a browser would display an html page before a php
one..do you know anything about this?
Thanks once again

-----Original Message-----
Running a .php page requires that the page is loaded on
a server with PHP
installed, otherwise the page will be "unknown" and the
download dialogue
presented.

Ron
--
Reply only to group - emails will be deleted unread.


message
Hi,

Am trying to hyperlink to a .php file however when I
click the hyperlink the FILE DOWNLOAD dialog box opens.
Why does this happen..can anyone fill me
in...Hyperlinking to another .html file is ok and does
not produce this download file thingy..

Rgds


.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Hyperlinking 1
not parsing php - off topic 4
Hyperlinking to Word documents 14
hyperlinking files 3
hyperlinking files 2
hyperlinking files 3
Hyperlink fade-out/fade-in change 5
HyperLinking 1

Top