|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
Since the ISP changed somthing, the opening php tag no longer works. <? echo("joe"); ?> fails, where as this code: <?php echo("joe"); ?> works as expected. Is there a setting in the phpinfo where i can see if this is disabled? PHPinfo reports version 4.4.7. This is the 1st time ive seen this error, and its a masive headache as the web design co (the old company) wrote the entire site (1000's of pages) using <? instead of <?php Please please me!! Joe |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
JoeB wrote:
> Since the ISP changed somthing, the opening php tag no longer works. > > <? echo("joe"); ?> > > fails, where as this code: > > <?php echo("joe"); ?> > > works as expected. > > Is there a setting in the phpinfo where i can see if this is disabled? > PHPinfo reports version 4.4.7. Yes, it's called "short_tags" and is disabled by default. Having it enabled may cause some problems when using "<?xml" at the start of your XHTML documents. > This is the 1st time ive seen this error, and its a masive headache as > the web design co (the old company) wrote the entire site (1000's of > pages) using <? instead of <?php Well, then just write a script to do the dirty work for you. -- ---------------------------------- Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- MSN:i_eat_s_p_a_m_for_breakfast@hotmail.com Jabber:ivansanchez@jabber.org ; ivansanchez@kdetalk.net |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
JoeB wrote:
> Hi, > > Since the ISP changed somthing, the opening php tag no longer works. > > <? echo("joe"); ?> > > fails, where as this code: > > <?php echo("joe"); ?> > > works as expected. > > Is there a setting in the phpinfo where i can see if this is disabled? > PHPinfo reports version 4.4.7. > > This is the 1st time ive seen this error, and its a masive headache as > the web design co (the old company) wrote the entire site (1000's of > pages) using <? instead of <?php > > > > Please please me!! > > > Joe > > In addition to what Iván said, plan on changing all of those short tags. But while there are 100's of pages, I suspect there aren't 1000's of source files - probably most of those pages are generated from a few scripts. It's a good thing you got rid of that old design company. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 16 Feb, 12:29, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote: > JoeB wrote: > > Since the ISP changed somthing, the opening php tag no longer works. > > > <? echo("joe"); ?> > > > fails, where as this code: > > > <?php echo("joe"); ?> > > > works as expected. > > > Is there a setting in the phpinfo where i can see if this is disabled? > > PHPinfo reports version 4.4.7. > > Yes, it's called "short_tags" and is disabled by default. > > Having it enabled may cause some problems when using "<?xml" at the start of > your XHTML documents. > > > This is the 1st time ive seen this error, and its a masive headache as > > the web design co (the old company) wrote the entire site (1000's of > > pages) using <? instead of <?php > > Well, then just write a script to do the dirty work for you. > > -- > ---------------------------------- > Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- > > MSN:i_eat_s_p_a_m_for_breakf...@hotmail.com > Jabber:ivansanc...@jabber.org ; ivansanc...@kdetalk.net Ive managed to find and replace most of them, the only ones i cannot find is the ones where there is a new line directly after the tag: <? code... Can someone come up with a way of finding these? Im using textpad, and it supports regex find expressions. Thanks for all the .. Jeo |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
..oO(JoeB)
>Ive managed to find and replace most of them, the only ones i cannot >find is the ones where there is a new line directly after the tag: > ><? >code... Huh? Why can't your editor find a simple "<?" string, regardless of whether there's a line break following or not? This shouldn't matter. >Can someone come up with a way of finding these? Im using textpad, >and it supports regex find expressions. The regex could be something like <\?\n HTH Micha |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On 16 Feb, 16:13, Michael Fesser <neti...@gmx.de> wrote:
> .oO(JoeB) > > >Ive managed to find and replace most of them, the only ones i cannot > >find is the ones where there is a new line directly after the tag: > > ><? > >code... > > Huh? Why can't your editor find a simple "<?" string, regardless of > whether there's a line break following or not? This shouldn't matter. > > >Can someone come up with a way of finding these? Im using textpad, > >and it supports regex find expressions. > > The regex could be something like > > <\?\n > > HTH > Micha HI, My editor can find "<?" but it finds thousands of them, most of which are already "<?php" The odd one is <? which i cannot find. The editor says it cannot run a regex with \n in it! J |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
JoeB wrote:
> My editor can find "<?" but it finds thousands of them, most of which > are already "<?php" Quick and dirty solution: just do that, and then replace "<?phpphp" with "<?php" ;-) -- ---------------------------------- Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- Oye, ¿tenéis un poco de cinta adhesiva? Es que se me está soltando el propulsor a chorro de la espalda. -- Piers Sellers, astronauta del Discovery, al Control de Misión de la NASA, al percatarse de cierto peligro durante la pasada misión STS-121. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Sat, 16 Feb 2008 05:34:00 -0800 (PST), JoeB <joe@kybert.com> wrote
in <1d68b85b-6e7e-4c44-9a34-6ff0000aa8c3@p73g2000hsd.googlegroups.com>: >On 16 Feb, 12:29, Iván Sánchez Ortega <ivansanchez-...@rroba- >escomposlinux.-.punto.-.org> wrote: >> JoeB wrote: >> > Since the ISP changed somthing, the opening php tag no longer works. >> >> > <? echo("joe"); ?> >> >> > fails, where as this code: >> >> > <?php echo("joe"); ?> >> >> > works as expected. >> >> > Is there a setting in the phpinfo where i can see if this is disabled? >> > PHPinfo reports version 4.4.7. >> >> Yes, it's called "short_tags" and is disabled by default. >> >> Having it enabled may cause some problems when using "<?xml" at the start of >> your XHTML documents. >> >> > This is the 1st time ive seen this error, and its a masive headache as >> > the web design co (the old company) wrote the entire site (1000's of >> > pages) using <? instead of <?php >> >> Well, then just write a script to do the dirty work for you. > >Ive managed to find and replace most of them, the only ones i cannot >find is the ones where there is a new line directly after the tag: > ><? >code... > >Can someone come up with a way of finding these? Im using textpad, >and it supports regex find expressions. TextPad doesn't support line endings in regular expressions (at least not as of 4.7, the version that I have). Why not just write a php script to handle it? You can run php from the command-line too. -- Charles Calvert | Software Design/Development Celtic Wolf, Inc. | Project Management http://www.celticwolf.com/ | Technical Writing (703) 580-0210 | Research |
|
![]() |
| Outils de la discussion | |
|
|