You are here: Use file() function to read a variable name, not a literal name. « PHP Programming Language « IT news, forums, messages
Use file() function to read a variable name, not a literal name.

Posted by walterbyrd on 12/17/88 11:54

I know I can use the file() function to read a file into an array by
providing a literal file name between single quotes:

$lines = file('literal_file_name');

But, what if I want file() to use a variable name?

$variable_file_name = "literal_file_name";
$lines = file($variable_file_name);

Of course, that example won't work. But what will?

 

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

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