Yes, the server supports php, and I don't want to make it into a php file
because its a big html file and I just need this little script on it. Why
cannot I embed php in html files?


"Andy Ladouceur" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's already been mentioned, but you do need to ensure you are using a
> .php extension on the file. Also, forgive me if this has already been
> covered, but are you sure the server even supports PHP?
>
> Try creating a new file with:
> <?php
> phpinfo();
> ?>
>
> And save it as something.php, check and see if it returns a table full
> of information or not.
>
> Andy
>
> Pooya Eslami wrote:
> > I put this in the body of an html file:
> >
> > <?php
> > if ($handle = opendir('.')) {
> >    while (false !== ($file = readdir($handle))) {
> >        if ($file != "." && $file != ".." && eregi('\.html$', $file)) {
> >            echo "<li><a href=\"$file\"><font color=\"#CC0000\">$file</
> >
> > font></a></li><br>";
> >        }
> >    }
> >    closedir($handle);
> > }
> >
> > echo "</ul>";
> > ?>
> >
> > the output page contains :
> >
> > $file
> > "; } } closedir($handle); } echo "
> > "; ?>
> >
> > I don't understand why.
> >
> > "Daniel Clark" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> >>Can you post the code and error.
> >>
> >>
> >>
> >>>>I took out the scrip tags and put in <?php in the beginning and ?>  at
> >
> > the
> >
> >>>>end, but it returns this:
> >>>>
> >>>>$file
> >>>>"; } } closedir($handle); } echo "
> >>>>"; ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to