A PHP script that generates another

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
peterachutha
New php-forum User
New php-forum User
Posts: 10
Joined: Sat May 31, 2014 10:35 pm

Sun Jun 01, 2014 12:25 am

I suspect I may know why it did not appear to work. It is actually working but its not visible as it looks like the browser is chomping everything. Try changing your code so that the browser ignores it as text by placing the output in a textarea:-

<html>
<bod>
<?php
if( file_exists("test.txt")){
echo "This works!";
$mydata = file_get_contents('test.txt');
?>
<textarea rows="10" cols="80"><?php echo $mydata?></textarea>
<?php
}
else{
echo "This doesn't work!";
}
?>
</body>

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests