You are here: Calling scripts « All PHP « IT news, forums, messages
Calling scripts

Posted by kenoli on 09/21/06 14:04

I'm interested in the correct way to do two things:

1. Stop executing a script and begin executing it again from the top.
(i.e. go back to the top of the .php file you are in and start over as
if you had called the file for the first time, realizing some variables
may need to be reset.)

2. Stop executing a script and start executing a script in another
..php file.

I'm not sure include() is the way to do this. I am not looking to
insert a script in an existing script but to exit one script and either
start it over or begin executing another one. I don't want the action
sent back to the first script at the end of the execution of the
second. I'm not sure how an include works exactly in this respect. I
think of it more as inserting code into some other code rather than as
sending the action elsewhere.

The only other way I can see to do this is to use the header()
function, but this can't be done once html has been sent to the
browser. I've never fully understood this function or understood how
this limitation works.

It is obvious how to do this when some user action is involved like a
form action or link selection. I am talking about how to do this as an
action from within a script where, for instance, a conditional like a
switch or something needs to send the action to the top of the same
script or to another .php file.

--Kenoli

 

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

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