|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
How can I write a php code that when it is include in a html page it
create a menu link automatically, reading from a main folder its subfolder and html files? bye bye EswA -- ESWA Censimento Rifiuti Salento: http://www.flickr.com/photos/15103736@N03/ MeetUpSalentiniUnitiConBeppeGrillo: http://beppegrillo.meetup.com/167/boards/ PersonalSite: http://eswa.altervista.org eMail: eswa@email.it Skype: eswa79 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Nov 25, 2:00 pm, eswa <e...@email.it> wrote:
> > How can I write a php code that when it is include in a html page it > create a menu link automatically, reading from a main folder its > subfolder and html files? You can't include PHP code into an HTML page. Cheers, NC |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Sun, 25 Nov 2007 14:29:13 -0800 (PST), NC wrote:
> On Nov 25, 2:00 pm, eswa <e...@email.it> wrote: >> >> How can I write a php code that when it is include in a html page it >> create a menu link automatically, reading from a main folder its >> subfolder and html files? > > You can't include PHP code into an HTML page. > > Cheers, > NC No? suggest you read up on php. PHP is somewhat like javascript in that it is incorporated into the html coding, except that you, the user, is not aware that it is there. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
richard wrote:
> On Sun, 25 Nov 2007 14:29:13 -0800 (PST), NC wrote: > >> On Nov 25, 2:00 pm, eswa <e...@email.it> wrote: >>> How can I write a php code that when it is include in a html page it >>> create a menu link automatically, reading from a main folder its >>> subfolder and html files? >> You can't include PHP code into an HTML page. >> >> Cheers, >> NC > > No? suggest you read up on php. PHP is somewhat like javascript in that it > is incorporated into the html coding, except that you, the user, is not > aware that it is there. > Sorry, I agree with NC. You can't include php code in html pages, unless you really screw up your configuration. You should include php code in phyp files. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Jerry Stuckle schreef:
> richard wrote: >> On Sun, 25 Nov 2007 14:29:13 -0800 (PST), NC wrote: >> >>> On Nov 25, 2:00 pm, eswa <e...@email.it> wrote: >>>> How can I write a php code that when it is include in a html page it >>>> create a menu link automatically, reading from a main folder its >>>> subfolder and html files? >>> You can't include PHP code into an HTML page. >>> >>> Cheers, >>> NC >> >> No? suggest you read up on php. PHP is somewhat like javascript in >> that it >> is incorporated into the html coding, except that you, the user, is not >> aware that it is there. >> > > Sorry, I agree with NC. You can't include php code in html pages, > unless you really screw up your configuration. You should include php > code in phyp files. > If you put your php script between <script> tags, it can be in you html |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Obiku wrote:
> Jerry Stuckle schreef: >> richard wrote: >>> On Sun, 25 Nov 2007 14:29:13 -0800 (PST), NC wrote: >>> >>>> On Nov 25, 2:00 pm, eswa <e...@email.it> wrote: >>>>> How can I write a php code that when it is include in a html page it >>>>> create a menu link automatically, reading from a main folder its >>>>> subfolder and html files? >>>> You can't include PHP code into an HTML page. >>>> >>>> Cheers, >>>> NC >>> >>> No? suggest you read up on php. PHP is somewhat like javascript in >>> that it >>> is incorporated into the html coding, except that you, the user, is not >>> aware that it is there. >>> >> >> Sorry, I agree with NC. You can't include php code in html pages, >> unless you really screw up your configuration. You should include php >> code in phyp files. >> > If you put your php script between <script> tags, it can be in you html > The PHP parser won't parse them unless Apache tells it to. Please show exactly how to configure Apache to perform this (without parsing all .html files as PHP, that is). -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On Sun, 25 Nov 2007 14:29:13 -0800 (PST), NC wrote...
> >On Nov 25, 2:00 pm, eswa <e...@email.it> wrote: >> >> How can I write a php code that when it is include in a html page it >> create a menu link automatically, reading from a main folder its >> subfolder and html files? > >You can't include PHP code into an HTML page. > >Cheers, >NC Whether you configure your Apache to parse just .php files or also use .html, there's a few functions in PHP you can use to get the files from a directory. If you read up on the opendir(), scandir() and/or readdir() that may out with what you're trying to do. http://www.php.net/manual/en/function.opendir.php http://www.php.net/manual/en/function.scandir.php http://www.php.net/manual/en/function.readdir.php Tom -- NewsGuy Accounts Go Jumbo! Extra NewsGuy increased from 30 to 50 GB of download capacity http://newsguy.com/overview.htm |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Nov 25, 5:02 pm, richard <s...@google.dom> wrote:
> On Sun, 25 Nov 2007 14:29:13 -0800 (PST), NC wrote: > > On Nov 25, 2:00 pm, eswa <e...@email.it> wrote: > > > > How can I write a php code that when it is include in a html > > > page it create a menu link automatically, reading from a main > > > folder its subfolder and html files? > > > You can't include PHP code into an HTML page. > > No? suggest you read up on php. PHP is somewhat like javascript > in that it is incorporated into the html coding, except that you, > the user, is not aware that it is there. I think you should follow your own suggestion: read up on PHP. PHP is nothing like JavaScript; JavaScript is executed client-side, PHP, server-side. By default, PHP code is only executed if it is located inside a *.php file. You can configure your server to treat *.html files as if they were *.php files, but this would preclude you from using other server-side options available for use in HTML files, such as SSI. Cheers, NC |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
On Nov 26, 8:04 am, Obiku <obie...@xs4all.com> wrote:
> > If you put your php script between <script> tags, > it can be in you html It can BE there. But it'll be useless, since it won't be executed. The server will just spit it out as-is... <script language="php"> ... </script> is functionally identical to <? php ... ?>. Regardless of which tag you use, PHP code is executed server-side, and by default the PHP interpreter is only invoked when a *.php file is parsed. Cheers, NC |
|
![]() |
| Outils de la discussion | |
|
|