Re: debugging and getting output from php code embedded in html
| From: | James Purvins | Date: | Sat, 08 Jul 2000 01:16:22 +0000 |
| Subject: | Re: debugging and getting output from php code embedded in html | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5500@lists.php.net to get a copy of this message | ||
Hey Ed,
Thanks for your suggestions...i really appreciate it!
I got it to work! And here is how it happened...
I copied the code to a file with extention .PHP and the script worked fine!
It seems like the browser is having trouble executing my PHP code in HTML
extension files.
Go figure !! Or maybe someone might have an answer for this strange
phenomenon!
Thanks for your patience list...i will be quiet now!
Jim Purvins
----- Original Message -----
From: Ed Vul <edv@whitepj.com>
To: <php-general@lists.php.net>
Sent: Friday, July 07, 2000 4:00 PM
Subject: Re: [PHP] debugging and getting output from php code embedded in
html
> so a page like:
> <html>
> <body>
> <?php
> echo "Hello";
> ?>
> </body
> </html>
> doesnt output antything?
>
> or is this just in that one page you're working on?
> maybe you didnt close an html tag somewhere and its outputting into that
> tag...
> did you check the source of the output page?
> these are all random shots in the dark.... if you post the code someone
with
> some knowledge (not I) may find some error.
>
> ""James Purvins"" <purvinsj@voyager.net> wrote in message
> news:018801bfe840$aeb965c0$28dbcfa9@net...
> > Thanks for the correction...
> >
> > But even explicit calls to "echo" in my HTML file give me no output...
> >
> > ----- Original Message -----
> > From: Ed Vul <edv@whitepj.com>
> > To: <php-general@lists.php.net>
> > Sent: Friday, July 07, 2000 1:03 PM
> > Subject: Re: [PHP] debugging and getting output from php code embedded
in
> > html
> >
> >
> > > I am also very green, maybe even teal... but i think i see your
problem:
> > > both echo commands are inside the if statement...
> > > $conn = pg_Connect("host=localhost user=mcsauto dbname=mcsauto");
> > > if (!$conn)
> > > {
> > > echo "Error !!!.\n";
> > > }
> > > echo "No Error !!!.\n";
> > >
> > > I think that would work... but I may be wrong too....
> > > and there might be some errors in your connect string, but i know
> nothing
> > > about that :)
> > >
> > >
> > > ""James Purvins"" <purvinsj@voyager.net> wrote in message
> > > news:015001bfe83b$1fc23900$28dbcfa9@net...
> > > I am extremely green and just starting my php journey.
> > >
> > > how do i display output information in an HTML file for debugging
> > purposes?
> > >
> > > currently, it seems all my "echo" commands in the html file do not
> display
> > > when i browse the file. where are these echo commands going? are they
> > going
> > > to the great bit bucket in the sky??? how do i get them to display??
> > >
> > > am i missing something really basic here?
> > >
> > > here is the code fragment ---->
> > >
> > > $conn = pg_Connect("host=localhost user=mcsauto dbname=mcsauto");
> > > if (!$conn) { echo "Error !!!.\n"; echo "No Error !!!.\n" } ;
> > >
> > > in either case...success or failure...shouldn't i be getting a message
> > when
> > > i browse the file?
> > >
> > > thank you for your patience....this list is really great!!!
> > >
> > > Jim Purvins
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail:
php-list-admin@lists.php.net
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>