2) run this code:
Code: Select all
$fileText = readfile(inputfile(<curpath>, "txt", "Choose an empty txt file."));
foreach($line, $fileText, "<crlf>", , "empty")
{
echo $line;
}Code: Select all
$fileText = readfile(inputfile(<curpath>, "txt", "Choose an empty txt file."));
foreach($line, $fileText, "<crlf>", , "empty")
{
echo $line;
}Not just a message, an "error message". And that's what you get.autocart wrote:according to the help file there should be a message.
Since <an empty thing> is a subset of <anything>, So the separator can be an empty string. Therefore, this script should be able to loop through the characters in a string by setting the separator to empty. Which is not what happens.foreach reference remarks wrote:The separator defaults to "|" (pipe), but can be set to anything, also multi-character strings.
Code: Select all
::$string='string'; foreach($letter, $string, ''){ echo $letter; }