Reply to Re: [PHP] Include file

Your name:

Reply:


Posted by Richard Davey on 03/30/05 04:50

Hello Marquez,

Wednesday, March 30, 2005, 2:41:15 AM, you wrote:

MD> Does anyone know how to include a variable page? The variable is a page
MD> name. Such as "inluded_file.html"

MD> Include ('../includes/$include');

MD> Does not seem to work.

You cannot use variables inside single quotes. Try this:

include "../includes/$include";

Same goes for anything in PHP, i.e.:

$test = "apple";
$word1 = "eat the $test";
$word2 = 'eat the $test';

Try this and see the difference the quotes make.

Best regards,

Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear computers. I fear the lack of them." - Isaac Asimov

[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

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