Jump to content

WriteGreatCode

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

WriteGreatCode's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It seems that it only works if there's only one line in the file. Maybe the hidden \r\n character (it is used in edit controls in the C++ Win32 API, which is what Notepad.exe was made in, for a new line) in the text is messing it up. Because I can echo it to the screen fine: <?php $fh = fopen ("example.txt", "r"); while (!feof ($fh)) { $file = $file . fgets ($fh) . "</br>"; } fclose ($fh); echo $file; ?> Just not use the alert function =/ So, not sure on this one, maybe someone else can help you out.
  2. http://www.knowledgesutra.com/forums/topic/6031-what-is-a-t-string/
  3. alert if a Java Script function, so it doesn't have to be defined on the PHP page. And what he said works fine besides the fact that he forgot the ending quote after </script> <?php $Text = "Hello World!"; echo "<script type='text/javascript'>alert('{$Text}');</script>" ?> haha we both messed up, you forgot a ; at the end.. sorry btw @OP I can't really see too well you have to pardon my crappy help <?php $Text = "Hello World!"; echo "<script type='text/javascript'>alert('{$Text}');</script>"; ?> Ooops, well that's embarrassing
  4. alert if a Java Script function, so it doesn't have to be defined on the PHP page. And what he said works fine besides the fact that he forgot the ending quote after </script> <?php $Text = "Hello World!"; echo "<script type='text/javascript'>alert('{$Text}');</script>" ?>
  5. You should post what errors you get when you go to run your code.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.