You are here: include/require dircetive problem « All PHP « IT news, forums, messages
include/require dircetive problem

Posted by igorp on 04/08/07 18:08

Hi,
can anyone tell me what's wrong with the following code:
==================================================
<?php
echo "Hello this is a test file on my server Seen: ${_POST['seen']} </
br>";

if(!isset($_POST['seen']) )
{
echo "HERE..."; $_POST['seen'] = 'yes';
require $_SERVER['SCRIPT_FILENAME'];
}
else{
echo "Not here...";
}echo "At the end of script ";

?>
==================================================
Basically, the idea was that the script should include/require
itself
at some condition, at the end of the script.
While it works fine on my home server and prints out

Hello this is a test file on my server Seen:
HERE...Hello this is a test file on my server Seen: yes
Not here...At the end of script At the end of script

on my hosting provider server it does not work as expected, i.e. the
include does not happen. The output will be:

Hello this is a test file on my server Seen:
HERE...

Any help would be greatly appreciated,
Igor.

 

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

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