473,382 Members | 1,390 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,382 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 1534
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.