473,657 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1551
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*******@yaho o.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.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
1200
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 values, the onclick event of the submit button populates these fields with a hard coded default start and end date. I know this works because I can actually see them populate before the page actually submits. These two values are requested on the...
7
3889
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. These are the commands and errors that I have found: --db2 => restart database sware drop pending tablespace (TS_FACT2) DB20000I The RESTART DATABASE command completed successfully. --db2 => list tablespaces
3
7833
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 not dropped. Now there are "SEVERE" error messages occuring everyday -few times. What should I do to ensure these messages are not thrown. 2005-04-27-06.24.04.087962-240 I6572370C334 LEVEL: Warning PID : 17042 TID : 1 ...
3
2275
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
4175
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 is no data received from the server for a period of time, I am unable to determine whether the connection is dropped or simply no data is sent from the server. Work around: Currently, I am trying to send data with 0 length to detect the...
3
1743
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 disconnected calls: Call ended by either user Is there a way we can identify the above scenario. Is there any API we can use to identify the same
5
2169
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 column <column1drop column <column2> drop column <column3>.............................drop column <column20> The above command was successful.
1
2094
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 data in any of the tables because the tablespace on those tables is invalid. Is there any way I can attach a new Table space to the existing tables(I get a SQL3022N error code -204 message) . I don't work with databases and am more into the DRDA...
0
3517
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 and get it's DDL and note the dropped table id. step4 - now restore the appropriate tablespace in the which the table is dropped step5 - rollforward the database step6 - now create the dropped table by using the ddl generated at LIST HISTORY...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.