You are here: Odd Directory Problem with PHP « PHP Language « IT news, forums, messages
Odd Directory Problem with PHP

Posted by AF on 06/24/05 15:52

I am a novice to PHP, so please forgive any dumb questions, etc.

I finally learned how to pass variable with php, or at least learned
one way.

My urls look like this

http://www.domain.com/webpage.php/variable1/variable2

In the above example, my web page which holds the php code is
obviously wegpage.php.

My php code returns to me the value of variable1 and variable2, and
subsequent php code works great.

Except for one odd thing: all of my relative urls are no longer
working properly.

For example, if I were to create a web page using FrontPage, or
NetObjects Fusion, or even by hand, I can use relative directories.
(I hope that is the correct name for them.) I then store my images in
a directory called "/images", and if my normal html code looks like
this

IMG SRC="/image/Florida-Small1.gif"

And I will see the image on a web page. Same goes for href's,
background images, etc.

But when I use the same web page with the php add, all of the relative
urls are messed up and the only way I can use a url in my code is to
add the full path, i.e. type this code

IMG SRC="http://www.domain.com/image/Florida-Small1.gif"

Is there a work around or a php function I am missing here that would
solve my problem?

Or to state it another way, I would like to take html code generated
from FrontPage or NetObjects, add the php code I need for value
passing and not have to edit the html code for the relative path.

By the way I have seen some java code that would solve the problem,
but I am trying to stay away from java code.


Best regards,

Al
http://www.affordablefloridainsurance.com
http://www.americanbestmortgages.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация