Reply to Re: newbie question about include() and include_once() functions

Your name:

Reply:


Posted by JP on 11/29/07 21:00

Hi All,

Thanks for the replies so far.

Here is my exact code and the error I am receiving when I run this:

Main file: example_include.php
<?php
include ('C:\Sebastian\work\php\testfunction.php');
echo "Calling testfunction\n";
testfunction("This is a test");
?>

File: testfunction.php
<?php
funciton testfunction($text)
{
echo "Inside testfunction\n");
echo "You passed the value " . $text . " to this function.\n";
}
?>

Now at my C: prompt, I run it as follows:

C:\Sebastian\work\php>php example_include.php
PHP Parse error: syntax error, unexpected T_STRING in C:\Sebastian
\work\php\tes
tfunction.php on line 2

C:\Sebastian\work\php>

[Back to original 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

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