You are here: Re: Change included code « PHP Programming Language « IT news, forums, messages
Re: Change included code

Posted by Jon Slaughter on 04/19/07 03:38

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:D5-dnQ6alNLrQrvbnZ2dnUVZ_jednZ2d@comcast.com...
> Jon Slaughter wrote:
>> Can I modify code that I have included using
>>
>> <?php
>> include("../Index.php");
>> ?>
>>
>> The Index.php file contains links that need to be modified to work.
>> Index.php is basically an html file uses a linked css file and when its
>> included in the new file its referencing a css file in the wrong spot. I
>> need to add "../" to the css file reference in Index.php to make it work.
>>
>> Thanks,
>> Jon
>
> Ensure your link is an absolute path relative to your website root. Then
> where you include index.php doesn't matter.
>

It would actually be a bit more trouble since any time I want to upload to
the server to test I will have to change the link. Would be easier just to
have php just add "../" to one spot instead manually doing it every time I
upload to the server.

 

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

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