php-general Digest 16 Apr 2006 19:29:07 -0000 Issue 4075

Topics (messages 234060 through 234085):

Re: phpMyAdmin--resetting auto increments to 0
        234060 by: Jim Lucas
        234061 by: Jim Lucas
        234062 by: chris smith
        234063 by: Jim Lucas
        234064 by: chris smith
        234075 by: Kevin Kinsey
        234078 by: tedd
        234079 by: Ryan A
        234080 by: Ryan A
        234082 by: Ryan A
        234084 by: Jay Blanchard

Re: Common Files
        234065 by: Jochem Maas
        234066 by: Alister Bulman
        234067 by: Jochem Maas

Fatal error: Unsupported operand types
        234068 by: kmh496
        234069 by: kmh496
        234070 by: chris smith
        234071 by: chris smith
        234072 by: kmh496
        234073 by: Jochem Maas

Re: 2 questions: Search in array and detect JS
        234074 by: Jochem Maas

Can't make shorthand work in PHP5
        234076 by: abrea.estudiobrea.com
        234077 by: cajbecu
        234081 by: chris smith

Re: Include Problem
        234083 by: Martin Alterisio

Re: Bar codes
        234085 by: Weber Sites LTD

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
alex wrote:
hi everyone

i have delete a few entries in my database as they were entered for testing purposes and are no longer need (actually 102 entries)... and even thought that db is empty i noticed that when the next entry went in the id number went to 103 not 0 so i was wondering is it possible to somehow reset the value to zero...

it is of int type and auto_increment

i have a few db's which id like to reset to zero i have tried placing a zero enrty after deleting the lot but it only jumps to its next increment.
does anyone know what i mean...?
any help will be grateful
regards alex
At the top of the Structure page ( or any other when viewing a detailed table view) you should have an Empty tab at the top left. Hit that and it should reset the counter
--- End Message ---
--- Begin Message ---
Jim Lucas wrote:
alex wrote:
hi everyone

i have delete a few entries in my database as they were entered for testing purposes and are no longer need (actually 102 entries)... and even thought that db is empty i noticed that when the next entry went in the id number went to 103 not 0 so i was wondering is it possible to somehow reset the value to zero...

it is of int type and auto_increment

i have a few db's which id like to reset to zero i have tried placing a zero enrty after deleting the lot but it only jumps to its next increment.
does anyone know what i mean...?
any help will be grateful
regards alex
At the top of the Structure page ( or any other when viewing a detailed table view) you should have an Empty tab at the top left. Hit that and it should reset the counter

also running the command:  DELETE FROM `table_name`
from the SQL box, should do the same trick

--- End Message ---
--- Begin Message ---
On 4/16/06, Jim Lucas <[EMAIL PROTECTED]> wrote:
> Jim Lucas wrote:
> > alex wrote:
> >> hi everyone
> >>
> >> i have delete a few entries in my database as they were entered for
> >> testing purposes and are no longer need (actually 102 entries)... and
> >> even thought that db is empty i noticed that when the next entry went
> >> in the id number went to 103
> >> not 0 so i was wondering is it possible to somehow reset the value to
> >> zero...
> >>
> >> it is of int type and auto_increment
> >>
> >> i have a few db's which id like to reset to zero i have tried placing
> >> a zero enrty after deleting the lot but it only jumps to  its next
> >> increment.
> >> does anyone know what i mean...?
> >> any help will be grateful
> >> regards alex
> >>
> > At the top of the Structure page ( or any other when viewing a
> > detailed table view) you should have an Empty tab at the top left.
> > Hit that and it should reset the counter
> >
> also running the command:  DELETE FROM `table_name`
> from the SQL box, should do the same trick

That won't reset the counter.

You'll probably need to do this after you delete all the data:

update table set id=0;

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
chris smith wrote:
On 4/16/06, Jim Lucas <[EMAIL PROTECTED]> wrote:
Jim Lucas wrote:
alex wrote:
hi everyone

i have delete a few entries in my database as they were entered for
testing purposes and are no longer need (actually 102 entries)... and
even thought that db is empty i noticed that when the next entry went
in the id number went to 103
not 0 so i was wondering is it possible to somehow reset the value to
zero...

it is of int type and auto_increment

i have a few db's which id like to reset to zero i have tried placing
a zero enrty after deleting the lot but it only jumps to  its next
increment.
does anyone know what i mean...?
any help will be grateful
regards alex

At the top of the Structure page ( or any other when viewing a
detailed table view) you should have an Empty tab at the top left.
Hit that and it should reset the counter

also running the command:  DELETE FROM `table_name`
from the SQL box, should do the same trick

That won't reset the counter.

You'll probably need to do this after you delete all the data:

update table set id=0;

--
Postgresql & php tutorials
http://www.designmagick.com/

Well, I just tried it on a temp table that I have for my blog under Mysql and it did reset the autoindex to 1.
Seems to work the way I said.

Jim

--- End Message ---
--- Begin Message ---
On 4/16/06, Jim Lucas <[EMAIL PROTECTED]> wrote:
> chris smith wrote:
> > On 4/16/06, Jim Lucas <[EMAIL PROTECTED]> wrote:
> >
> >> Jim Lucas wrote:
> >>
> >>> alex wrote:
> >>>
> >>>> hi everyone
> >>>>
> >>>> i have delete a few entries in my database as they were entered for
> >>>> testing purposes and are no longer need (actually 102 entries)... and
> >>>> even thought that db is empty i noticed that when the next entry went
> >>>> in the id number went to 103
> >>>> not 0 so i was wondering is it possible to somehow reset the value to
> >>>> zero...
> >>>>
> >>>> it is of int type and auto_increment
> >>>>
> >>>> i have a few db's which id like to reset to zero i have tried placing
> >>>> a zero enrty after deleting the lot but it only jumps to  its next
> >>>> increment.
> >>>> does anyone know what i mean...?
> >>>> any help will be grateful
> >>>> regards alex
> >>>>
> >>>>
> >>> At the top of the Structure page ( or any other when viewing a
> >>> detailed table view) you should have an Empty tab at the top left.
> >>> Hit that and it should reset the counter
> >>>
> >>>
> >> also running the command:  DELETE FROM `table_name`
> >> from the SQL box, should do the same trick
> >>
> >
> > That won't reset the counter.
> >
> > You'll probably need to do this after you delete all the data:
> >
> > update table set id=0;
> >
> > --
> > Postgresql & php tutorials
> > http://www.designmagick.com/
> >
> >
> Well, I just tried it on a temp table that I have for my blog under
> Mysql and it did reset the autoindex to 1.
>
> Seems to work the way I said.

Hmm, well there you go. Thanks for letting us know :)

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
alex wrote:

hi everyone

i have delete a few entries in my database as they were entered for testing purposes and are no longer need (actually 102 entries)... and even thought that db is empty i noticed that when the next entry went in the id number went to 103 not 0 so i was wondering is it possible to somehow reset the value to zero...

it is of int type and auto_increment

i have a few db's which id like to reset to zero i have tried placing a zero enrty after deleting the lot but it only jumps to its next increment.
does anyone know what i mean...?
any help will be grateful
regards alex

Select the desired database on the left.  The browser
will reload and show the "STRUCTURE" page.

Click on the SQL tab; the browser should now load a
page with a textarea that says "Run SQL query/queries
on database FOOBAR".

Enter the following in the textarea:

   ALTER TABLE footable auto_increment=0;

and then press the "GO" button.

You can set the auto_increment number to any positive
integer, AFAIK, though there might be a limit.

:-)

Kevin Kinsey

--
Just because you're paranoid doesn't mean they AREN'T after you.

--- End Message ---
--- Begin Message ---
At 4:46 PM +1000 4/16/06, alex wrote:
hi everyone

i have delete a few entries in my database as they were entered for testing
purposes and are no longer need (actually 102 entries)... and even thought
that db is empty i noticed that when the next entry went in the id number
went to 103
not 0 so i was wondering is it possible to somehow reset the value to
zero...

it is of int type and auto_increment

i have a few db's which id like to reset to zero i have tried placing a zero
enrty after deleting the lot but it only jumps to  its next increment.
does anyone know what i mean...?
any help will be grateful
regards alex

Alex:

This always works for me in mySQLAdmin.

1. Delete the first record.
2. Reset the auto_increment to whatever you want.
3. Insert a record.
4. Delete that record.

After that, the next record will start at the new auto_increment. Don't ask why, that's just the way it works.

If you want to reset the ID from within php, try this:

// Renumber the Existing 'id' Sequence
alter table $table_name
drop id,
add id int unsigned not null auto_increment first,
auto_increment = 1;

But, don't tell anyone that you did it AND especially don't tell anyone I gave you the code. This is a big "no-no" as decreed by the dB Gods and is seldom committed to written word. :-)

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

--- End Message ---
--- Begin Message ---
Alex,
Heres a very simple way to do exactly what you want as long as you are
deleting all the records from the table:

once you are in phpmyadmin you should have a frame with the database name(s)
on the left and the tables on the right,
click on the database name so that you have a list of tables in the right
frame...click the table you want to reset on the left frame,
the right frame will reload with that tables details.... then on the top
right you will find a link that says "empty" click that and
it will delete everything and reset everything....

Another way would be to simply export the table structure, drop the table
and create it again...

HTH

Cheers,
Ryan

--- End Message ---
--- Begin Message ---
Oops sorry, I made a little mistake here:


click on the database name so that you have a list of tables in the
*right* frameI meant: click on the database name so that you have a list of
tables in the
*LEFT* frameCheers,Ryan

--- End Message ---
--- Begin Message ---
Oops sorry, I made a little mistake here:


click on the database name so that you have a list of tables in the
*right* frameI meant: click on the database name so that you have a list of
tables in the
*LEFT* frameCheers,Ryan

--- End Message ---
--- Begin Message ---
[snip]
i have delete a few entries in my database as they were entered for
testing 
purposes and are no longer need (actually 102 entries)... and even
thought 
that db is empty i noticed that when the next entry went in the id
number 
went to 103
not 0 so i was wondering is it possible to somehow reset the value to 
zero...

it is of int type and auto_increment

i have a few db's which id like to reset to zero i have tried placing a
zero 
enrty after deleting the lot but it only jumps to  its next increment.
does anyone know what i mean...?
any help will be grateful
[/snip]

Darned basic SQL; 

TRUNCATE <table> 

Will empty the table and reset the auto-increment back to the beginning.

--- End Message ---
--- Begin Message ---
Shaun wrote:
Hi,

We have a dedicated UNIX server running FreeBSD, is it possible to set a directory where we can place a set of common files that can be used by all of our web sites?

yes, but if you use openbase_dir then don't forget to add the relevant dir
to the openbase_dir list.

include_path is your friend when doing something like what you are asking about.

also check out PEAR (pear.php.net) which does exactly what you asked about,
the pear system may give you more/some ideas about how to structure and access
you common files.


Thanks for your advice

--- End Message ---
--- Begin Message ---
On 16/04/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Shaun wrote:
> > Hi,
> >
> > We have a dedicated UNIX server running FreeBSD, is it possible to set a
> > directory where we can place a set of common files that can be used by all
> > of our web sites?

> also check out PEAR (pear.php.net) which does exactly what you asked about,
> the pear system may give you more/some ideas about how to structure and access
> you common files.

I tend to collect all my common code into a single directory
heirarchy, and put a copy into the systems' PEAR directory.  Then I
can just go
require_once 'MyCompany/filename.php';

from anywhere on the system.  Until PEAR produces a module called
'MyCompany' (unlikely), it will live there entirely happily.

Alister

--- End Message ---
--- Begin Message ---
Alister Bulman wrote:
On 16/04/06, Jochem Maas <[EMAIL PROTECTED]> wrote:

Shaun wrote:

Hi,

We have a dedicated UNIX server running FreeBSD, is it possible to set a
directory where we can place a set of common files that can be used by all
of our web sites?


also check out PEAR (pear.php.net) which does exactly what you asked about,
the pear system may give you more/some ideas about how to structure and access
you common files.


I tend to collect all my common code into a single directory
heirarchy, and put a copy into the systems' PEAR directory.  Then I
can just go
require_once 'MyCompany/filename.php';

from anywhere on the system.  Until PEAR produces a module called
'MyCompany' (unlikely), it will live there entirely happily.

sounds like a good plan - in the future you could even consider setting
up your own pear channel (pear server) which houses custom packages
(e.g. 'MyCompany') which you could then install into any pear installation
you need it.

just a thought :-)


Alister


--- End Message ---
--- Begin Message ---
can somebody explain why

            $this->param = $this->SYSTEM->db->answer + $this->param;

is causing the error 


Fatal error: Unsupported operand types
in /var/www/current/mjguest/modules/settings.php on line 52



context is 


        function settings(&$SYSTEM)
        {
            $this->SYSTEM = &$SYSTEM;
            $this->SYSTEM->db->ask(1, 'settings_load');
            $this->SYSTEM->db->get_row();

            $this->param = $this->SYSTEM->db->answer + $this->param;
        }




-- 
my site <a href="http://www.myowndictionary.com";>myowndictionary</a> was
made to help students of many languages learn them faster.

--- End Message ---
--- Begin Message ---
2006-04-16 (일), 19:35 +0900, kmh496 쓰시길:
> can somebody explain why
> 
>             $this->param = $this->SYSTEM->db->answer + $this->param;
> 
> is causing the error 
> 
> 
> Fatal error: Unsupported operand types
> in /var/www/current/mjguest/modules/settings.php on line 52
> 
> 
> 
> context is 
> 
> 
>         function settings(&$SYSTEM)
>         {
>             $this->SYSTEM = &$SYSTEM;
>             $this->SYSTEM->db->ask(1, 'settings_load');
>             $this->SYSTEM->db->get_row();
> 
>             $this->param = $this->SYSTEM->db->answer + $this->param;
>         }
> 
> 
> 
> 
> -- 

what are they trying to do//?

for what "does param mean" question, param is just above that part..

    class settings
    {
        var $SYSTEM;

        var $param  = array

        // Maximum length for web site title
        (   'titlelen'          => 28       # DEFAULT: 28   # MAXIMUM:
50

        // Maximum length for administrator email
        ,   'adminmaillen'      => 50       # DEFAULT: 50   # MAXIMUM:
80

        // Max Width and Height of avatars thumbnails (in pixels)
        ,   'userpic' => array
            (   'width'     => 60       # Width in pixels   # DEFAULT:
60       # EDIT ACCORDING TO CUSTOM LAYOUT
            ,   'height'    => 60       # Height in pixels  # DEFAULT:
60       # EDIT ACCORDING TO CUSTOM LAYOUT
            )

        // Available date-time formats (valid patterns for php "date()"
function)
        ,   'dateformats' => array
            (   'd.m.Y h:ia'            => 'D.M.Y 12h'      # Business
international
            ,   'm/d/Y h:ia'            => 'M/D/Y 12h'      # American
            ,   'Y-m-j h:ia'            => 'Y-M-D 12h'      # Asian
            ,   'd/m/Y H:i'             => 'D/M/Y 24h'      # European
            ,   'F, jS Y h:ia'          => 'MM, Dth Y 12h'  # English
            ,   'd.m.Y @ B .\b\e\a\t'   => 'D.M.Y @ .beat'  # Swatch(R)
Internet time
            )#  PATTERN                 => REPRESENTATION
        );

        function settings(&$SYSTEM)
        {
            $this->SYSTEM = &$SYSTEM;
            $this->SYSTEM->db->ask(1, 'settings_load');
            $this->SYSTEM->db->get_row();

            $this->param = $this->SYSTEM->db->answer + $this->param;
        }




the db->answer is ...................  

       function ask()
        {
            $qparams = func_get_args();

            $this->__lastquestion = $qparams[1];

            $this->query($qparams[0],
strtr(vsprintf($this->questions[$qparams[1]], array_slice($qparams, 2)),
$this->tables));
        }

        function get_field($num = 0)
        {
            $this->answer = @mysql_fetch_row($this->__cachedquery);

            return ($this->answer ? $this->answer[$num] :
$this->__error());
        }

        function get_row()
        {
            $this->answer = @mysql_fetch_assoc($this->__cachedquery);

            return ($this->answer ? true : $this->__error());
        }

--- End Message ---
--- Begin Message ---
On 4/16/06, kmh496 <[EMAIL PROTECTED]> wrote:
>
> can somebody explain why
>
>             $this->param = $this->SYSTEM->db->answer + $this->param;
>
> is causing the error
>
>
> Fatal error: Unsupported operand types
> in /var/www/current/mjguest/modules/settings.php on line 52
>
>
>
> context is
>
>
>         function settings(&$SYSTEM)
>         {
>             $this->SYSTEM = &$SYSTEM;
>             $this->SYSTEM->db->ask(1, 'settings_load');
>             $this->SYSTEM->db->get_row();
>
>             $this->param = $this->SYSTEM->db->answer + $this->param;
>         }

What is $this->param set to initially?
What is $this->SYSTEM->db->answer ?

use gettype and see what they are:

echo gettype($this->param) . '<br/>';
echo gettype($this->SYSTEM->db->answer) . '<br/>';

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
On 4/16/06, kmh496 <[EMAIL PROTECTED]> wrote:
> 2006-04-16 (일), 19:35 +0900, kmh496 쓰시길:
> > can somebody explain why
> >
> >             $this->param = $this->SYSTEM->db->answer + $this->param;
> >
> > is causing the error
> >
> >
> > Fatal error: Unsupported operand types
> > in /var/www/current/mjguest/modules/settings.php on line 52
> >
> >
> >
> > context is
> >
> >
> >         function settings(&$SYSTEM)
> >         {
> >             $this->SYSTEM = &$SYSTEM;
> >             $this->SYSTEM->db->ask(1, 'settings_load');
> >             $this->SYSTEM->db->get_row();
> >
> >             $this->param = $this->SYSTEM->db->answer + $this->param;
> >         }
> >
> >
> >
> >
> > --
>
> what are they trying to do//?
>
> for what "does param mean" question, param is just above that part..
>
>     class settings
>     {
>         var $SYSTEM;
>
>         var $param  = array
>
>         // Maximum length for web site title
>         (   'titlelen'          => 28       # DEFAULT: 28   # MAXIMUM:
> 50
>
>         // Maximum length for administrator email
>         ,   'adminmaillen'      => 50       # DEFAULT: 50   # MAXIMUM:
> 80
>
>         // Max Width and Height of avatars thumbnails (in pixels)
>         ,   'userpic' => array
>             (   'width'     => 60       # Width in pixels   # DEFAULT:
> 60       # EDIT ACCORDING TO CUSTOM LAYOUT
>             ,   'height'    => 60       # Height in pixels  # DEFAULT:
> 60       # EDIT ACCORDING TO CUSTOM LAYOUT
>             )
>
>         // Available date-time formats (valid patterns for php "date()"
> function)
>         ,   'dateformats' => array
>             (   'd.m.Y h:ia'            => 'D.M.Y 12h'      # Business
> international
>             ,   'm/d/Y h:ia'            => 'M/D/Y 12h'      # American
>             ,   'Y-m-j h:ia'            => 'Y-M-D 12h'      # Asian
>             ,   'd/m/Y H:i'             => 'D/M/Y 24h'      # European
>             ,   'F, jS Y h:ia'          => 'MM, Dth Y 12h'  # English
>             ,   'd.m.Y @ B .\b\e\a\t'   => 'D.M.Y @ .beat'  # Swatch(R)
> Internet time
>             )#  PATTERN                 => REPRESENTATION
>         );
>
>         function settings(&$SYSTEM)
>         {
>             $this->SYSTEM = &$SYSTEM;
>             $this->SYSTEM->db->ask(1, 'settings_load');
>             $this->SYSTEM->db->get_row();
>
>             $this->param = $this->SYSTEM->db->answer + $this->param;
>         }
>
>
>
>
> the db->answer is ...................
>
>        function ask()
>         {
>             $qparams = func_get_args();
>
>             $this->__lastquestion = $qparams[1];
>
>             $this->query($qparams[0],
> strtr(vsprintf($this->questions[$qparams[1]], array_slice($qparams, 2)),
> $this->tables));
>         }
>
>         function get_field($num = 0)
>         {
>             $this->answer = @mysql_fetch_row($this->__cachedquery);
>
>             return ($this->answer ? $this->answer[$num] :
> $this->__error());
>         }
>
>         function get_row()
>         {
>             $this->answer = @mysql_fetch_assoc($this->__cachedquery);
>
>             return ($this->answer ? true : $this->__error());
>         }


Sounds like you have a bad query and instead of answer being a row,
it's something else.

Print out everything before you use it:

instead of:
$this->param = $this->SYSTEM->db->answer + $this->param;

$answer = $this->SYSTEM->db->answer;
$param = $this->param;

echo "Answer: " . $answer . "<br/>";

If that's not an array, that's your problem and you'll have to debug
why it's not an array.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
2006-04-16 (일), 21:02 +1000, chris smith 쓰시길:
> On 4/16/06, kmh496 <[EMAIL PROTECTED]> wrote:
> > 2006-04-16 (일), 19:35 +0900, kmh496 쓰시길:
> > > can somebody explain why
> > >
> > >             $this->param = $this->SYSTEM->db->answer + $this->param;
> > >
> > > is causing the error
> > >
> > >
> > > Fatal error: Unsupported operand types
> > > in /var/www/current/mjguest/modules/settings.php on line 52

> Sounds like you have a bad query and instead of answer being a row,
> it's something else.
> 
> Print out everything before you use it:
> 
> instead of:
> $this->param = $this->SYSTEM->db->answer + $this->param;
> 
> $answer = $this->SYSTEM->db->answer;
> $param = $this->param;
> 
> echo "Answer: " . $answer . "<br/>";
> 
> If that's not an array, that's your problem and you'll have to debug
> why it's not an array.
> 
> --

list and especially dmajick @ gmail, 
thanks for your help.  
i will have to debug later, i am sorry, i have to run right now.
frankly speaking, i am simply having a bad day.

--- End Message ---
--- Begin Message ---
kmh496 wrote:
can somebody explain why

            $this->param = $this->SYSTEM->db->answer + $this->param;

is causing the error

no. because:

a, you don't mention the version of php you use
b, we don't have knowledge of you codebase (posting code listings for
a complete class really isn't going to help much)

have you tried to debug the problem? using print_r() or var_dump()?

e.g.: ...


Fatal error: Unsupported operand types
in /var/www/current/mjguest/modules/settings.php on line 52



context is

        function settings(&$SYSTEM)
        {
            $this->SYSTEM = &$SYSTEM;
            $this->SYSTEM->db->ask(1, 'settings_load');
            $this->SYSTEM->db->get_row();

echo '<pre>';
var_dump($this->SYSTEM->db->answer, $this->param)
echo '</pre>';


            $this->param = $this->SYSTEM->db->answer + $this->param;
        }





--- End Message ---
--- Begin Message ---
don't know if someone mentioned it already but i was digging around in the docs
for something completely different and bumped into this:

preg_grep() [http://php.net/preg_grep]

and I thought of your question, might be just what your looking for.

I can't remember having come across this func before - learn something new 
every day :-)


Ryan A wrote:
Hi,
Like the subject says; I have two questions:

1) Is it possible to detect JavaScript via php... and yes I do know that JS
is client side while PHP is server...but how else to do it?
The reason I ask is before serving an AJAX page I would like to make sure JS
is enabled, if not, serve the other "normal page"... I am sure I am not the
first person to come accross this little problem, how did you solve it?

I have seen some suggestions on google like having a hidden form field  and
using  js to put a value in it, if it exists when the form is sent then JS
is on..if not, its not... but that method is not the best in an AJAX
situation...right?


2) How can I search in an array for a particular word?

eg: in an array "movie" I have this kind of data:
movie_name=> some movie
cast=> Jim Carrey, Richard Pryor, Eddie Murphy

I want to search on either "Richard" or "Richard Pryor" (must be case
insensitive too)
something like a SELECT with a LIKE %% statement

I have been fooling around with in_array() but not getting anywhere
fast..... am I on the right track?
Links, code examples or advise would be as always....appreciated.

Thanks,
Ryan


--- End Message ---
--- Begin Message ---
Dear List,
The shorthand form <?=$printthis?> worked fine for me in PHP4, but I
cannot make it work in PHP5. (<?php print($printthis); ?> works ok,
however).
Could anybody please tell me if this form is still available in PHP5, and,
if so, if a different syntax is needed?
I searched the matter in the documentation but couldn't find it.
Thank you

Alberto Brea
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello,

Check your php.ini configuration, there is an option to activate this
option.

[EMAIL PROTECTED] wrote:
> Dear List,
> The shorthand form <?=$printthis?> worked fine for me in PHP4, but I
> cannot make it work in PHP5. (<?php print($printthis); ?> works ok,
> however).
> Could anybody please tell me if this form is still available in PHP5, and,
> if so, if a different syntax is needed?
> I searched the matter in the documentation but couldn't find it.
> Thank you
> 
> Alberto Brea
> [EMAIL PROTECTED]
> 

--- End Message ---
--- Begin Message ---
On 4/16/06, cajbecu <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Check your php.ini configuration, there is an option to activate this
> option.

Might help to tell them what it is..

Look for short_open_tag.

http://www.php.net/manual/en/ini.core.php

(you can enable it with a htaccess file if need be).

> [EMAIL PROTECTED] wrote:
> > Dear List,
> > The shorthand form <?=$printthis?> worked fine for me in PHP4, but I
> > cannot make it work in PHP5. (<?php print($printthis); ?> works ok,
> > however).
> > Could anybody please tell me if this form is still available in PHP5, and,
> > if so, if a different syntax is needed?
> > I searched the matter in the documentation but couldn't find it.
> > Thank you

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Ups, I forgot to reply to everyone again, sorry.

---------- Forwarded message ----------
From: Martin Alterisio <[EMAIL PROTECTED]>
Date: 16-abr-2006 13:53
Subject: Re: [PHP] Include Problem
To: Shaun <[EMAIL PROTECTED]>

You're using an absolute path to the file, maybe what you really meant to do
was:

include("cms/templates/footer.php");

2006/4/15, Shaun < [EMAIL PROTECTED]>:

> Hi,
>
> I am having problems with an include statement, i am using the following
> statement in an effort to include a footer file on my page:
>
> include("/cms/templates/footer.php");
>
> However I get the following error:
>
> Warning: main(/cms/templates/footer.php): failed to open stream: No such
> file or directory in /home/m/y/mysite/public_html/cms/news/index.php on
> line
> 38
>
> Warning: main(/cms/templates/footer.php): failed to open stream: No such
> file or directory in /home/m/y/mysite/public_html/cms/news/index.php on
> line
> 38
>
> Warning: main(): Failed opening '/cms/templates/footer.php' for inclusion
> (include_path='.:/lib/php') in
> /home/m/y/mysite/public_html/cms/news/index.php on line 38
>
> The file is definitely there, the script just doesn't seem to be picking
> it
> up, has anyone else had this problem?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Barcodes On The Fly With GD
http://www.weberdev.com/get_example-184.html 

Sincerely 
 
berber 
 
Visit the Weber Sites Today, 
To see where PHP might take you tomorrow. 
PHP code examples : http://www.weberdev.com 
PHP & MySQL Forums : http://www.weberforums.com
Learn PHP & MySQL Playing Trivia : http://www.webertrivia.com
SEO Data Monitor http://seo.weberdev.com


-----Original Message-----
From: Emil Edeholt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 5:50 PM
To: [email protected]
Subject: [PHP] Bar codes

Hi,

I've never used bar codes before. And now I need to print out bar codes, and
I've been told it should be in the format K39 Normal (I could have
misunderstood since I can't find that on google. Maybe Code 39 Normal?). 
Any idea how to find that bar code font or what it's called? And what shall
I use to print it out? Is it just as a regulat font, or do I need some
special bar code lib?

Thanks for your time

Best regards Emil

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

--- End Message ---

Reply via email to