You are here: Re: Simple question « PHP Programming Language « IT news, forums, messages
Re: Simple question

Posted by Sheldon Glickler on 07/16/06 21:01

"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:a4607$44baa69f$8259c69c$31682@news1.tudelft.nl...
> Sheldon Glickler wrote:
>> Here is the problem I have. I have added a management interface in
>> php for a website that was all html and flash. Whereas before items
>> were hard-coded, now they are pulled up from a database. I can
>> change the links from html to php almost everywhere. One of them is
>> located within a flash file, however. The source for it was lost
>> because of a computer crash (yes, she didn't back it up -- arghh).
>
> I keep my hands of Flash, but maybe some people could help you retrieve
> it,
> so it can be altered?

She bought something that can retrieve to code from the .swf, but is having
problems.

>
>> So, here is what I want to do but don't know how. I want to replace
>> the existing referenced html page with code that will redirect the
>> user (without notification) to the new php page. I tried a test
>> called test1.html that simply had a header statement within <?php ?>
>> to go to another page, but that didn't work.
>
> Why not?
> This should work, if the user allows redirects (and almost all users do):
> <?php header('Location : http://www.example.com'; exit; ?>

This is exactly what I did, but calling it test1.htnl simply did not do
anything. Remember that the intention is to replace a page that is
currently pointed to as something.html with this redirecting file which will
be called something.php and will be the modified original something.html so
that it includes the new php stuff. Apparantly for the header statement to
work it has to be in a .php file. Inside a .html file simply did not work.

>
> Keep in mind you shouldn't have any output before the header statement.
>
>> How do I code the html page to automatically go to another page?
>
> It's possible in HTML, see
> http://webdesign.about.com/od/metataglibraries/a/aa080300a.htm. It's Bad
> Practice though...
>
> If you can't do it in PHP for some reason, you could also do it in Apache
> using mod_rewrite.
>
> On a side note, the HTTP header 301 (permanently moved), was invented for
> this kind of stuff.
>
> Grtz,
> --
> Rik Wasmus
>
>

 

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

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