473,217 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,217 software developers and data experts.

PHP dropped in my lap...need help!

I have to come up to speed quickly on PHP since I have been given the
responsibilty of updating our website.

I have setup a local web server through IIS, downloaded and installed
PHP. I'm using Dreamweaver to edit my pages. When attempting to preview
pages the include file is being read and the page is properly displayed
in the browser with the exception of images.

I think I know what the problem is, but I'm not sure how to fix it. The
include file for the image source reads as follows:

<img src="/images/header-right.jpg"

This apparently is relative to the root of the remote website but when
previewed locally the server is looking for the image here:

http://localhost/images/header-right.jpg

I need it to look here:

http://localhost/localwebsitecopy/im...ader-right.jpg

What is the best approach for me to use to allow me to properly load
these images both locally (for preview) and on the remote website?

Any help would be appreciated and please remember that you are not
talking to a programmer (I'm sure this is obvious.)

Thanks!

Dave

Jul 17 '05 #1
5 1528
DaveB wrote:
I have to come up to speed quickly on PHP since I have been given the
responsibilty of updating our website.

I have setup a local web server through IIS, downloaded and installed
PHP. I'm using Dreamweaver to edit my pages. When attempting to preview pages the include file is being read and the page is properly displayed in the browser with the exception of images.

I think I know what the problem is, but I'm not sure how to fix it. The include file for the image source reads as follows:

<img src="/images/header-right.jpg"

This apparently is relative to the root of the remote website but when previewed locally the server is looking for the image here:

http://localhost/images/header-right.jpg

I need it to look here:

http://localhost/localwebsitecopy/im...ader-right.jpg

What is the best approach for me to use to allow me to properly load
these images both locally (for preview) and on the remote website?

Any help would be appreciated and please remember that you are not
talking to a programmer (I'm sure this is obvious.)

Thanks!

Dave


Jul 17 '05 #2
You could change root of your development server so that it matches..
Or your could set up a virtual host on the dev server for the same
purpose.

Jul 17 '05 #3

"DaveB" <da*******@yahoo.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I have to come up to speed quickly on PHP since I have been given the
responsibilty of updating our website.

I have setup a local web server through IIS, downloaded and installed
PHP. I'm using Dreamweaver to edit my pages. When attempting to preview
pages the include file is being read and the page is properly displayed
in the browser with the exception of images.

I think I know what the problem is, but I'm not sure how to fix it. The
include file for the image source reads as follows:

<img src="/images/header-right.jpg"

<snip>
I'm not sure about ISS, but I know my version on apache only works without
the preceeding / for example:

<img src="images/header-right.jpg">
Jul 17 '05 #4

Phillip Parr wrote:
I'm not sure about ISS, but I know my version on apache only works without the preceeding / for example:

<img src="images/header-right.jpg">


Uh... that "only works" because the above images directory is relative
to the local path and not in the server's document root.
In your above example "./images/header-right.jpg" would also work
where the "." refers to the current directory/folder

Jul 17 '05 #5
DaveB wrote:
I have to come up to speed quickly on PHP since I have been given the
responsibilty of updating our website.

I have setup a local web server through IIS, downloaded and installed
PHP. I'm using Dreamweaver to edit my pages. When attempting to preview
pages the include file is being read and the page is properly displayed
in the browser with the exception of images.

I think I know what the problem is, but I'm not sure how to fix it. The
include file for the image source reads as follows:

<img src="/images/header-right.jpg"

This apparently is relative to the root of the remote website this is not a relative path. it is simply a path. in this path, 'images'
is the name a directory immediately below the web site's document root
('/').
but when
previewed locally the server is looking for the image here:

http://localhost/images/header-right.jpg the server is looking for a directory named 'images' immedialtely below
the web site's document root, just as it does on your remote website.
I need it to look here:

http://localhost/localwebsitecopy/im...ader-right.jpg

What is the best approach for me to use to allow me to properly load
these images both locally (for preview) and on the remote website? 1. if you're using dreamweaver, there's no need for you to use absolute
paths (like '/images/header-right.jpg') in your local code. let
dreamweaver create relative paths for you.
2. if you're using dreamweaver, make use of the 'testing server' in the
site's setup. this will allow you to specify the site's root on your
local server for previewing purposes.
Any help would be appreciated and please remember that you are not
talking to a programmer (I'm sure this is obvious.)

Thanks!

Dave


good luck
sadara
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kevin Moore | last post by:
Hello. I have an ASP page written in JSCRIPT that contains a regular text field for a start date and an end date. The user may enter values in this field or not. If the user doesn't enter any...
7
by: cbielins | last post by:
So yea... I rm-ed a rlv that our TS_FACT2 tblspace was using. So our db went to the crapper. The tblspace didn't have any pertinent info, so I'm ok with dropping the tblspace and starting over. ...
3
by: hikums | last post by:
I dropped the db2detaildeadlock event monitor without flushing the events that were full hoping dropping it will clear the messages also. I now understand this is a default monitor that I should...
3
by: Rajesh Kumar Mallah | last post by:
Hi, Looks like alter table does not tells about the indexes it dropped PG version: 7.4.3 Regds mallah.
2
by: Jck | last post by:
Could someone tell me how to detect TcpClient connection dropped, please? I have a TcpClient connected to a server by IP and Port. The TcpClient only read data from the server. However, if there...
3
by: beenapatni | last post by:
Hi We need to identify difference between a dropped call and normally ended calls in windows mobile phone Dropped calls: Call diconnected due to no n/w signal, low battery level...etc Normally...
5
by: Rahul Babbar | last post by:
Hi, I am facing an issue here. I had to drop a number of columns (around 20) from a table, which I tried to do all at the same time using the following command. Alter table table_name drop...
1
by: Ravi Padmakar | last post by:
Hello, In the process of making my database work (I started with not being able to insert records because of tablespace issues) , I dropped the tablespace for it. Now I am not able to access the...
0
by: bbkm | last post by:
when i am doing dropped table reccovery step1- the tablespace should be in recovery mode is it rite step2 - the database should be in archivelog mode is it rite step-3 - identify the dropped table...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.