php-general Digest 27 May 2004 01:19:33 -0000 Issue 2786
Topics (messages 186985 through 187025):
Getting the name of the Class
186985 by: Lasse Cederstr�m
dynamic table
186986 by: nabil
186989 by: Steve Douville
186991 by: Richard Harb
186993 by: Curt Zirzow
186995 by: strategies
186998 by: strategies
187008 by: Daniel Clark
Re: Sessions simply do not work?
186987 by: Tom Rogers
Re: ISP proxy caching major pain
186988 by: Curt Zirzow
186990 by: strategies
session & HTML target = "_blank" element
186992 by: Hardik Doshi
187011 by: Torsten Roehr
Is PHP a good language to work with images?
186994 by: Rui Silva
How to check for a $_GET without throwing a Notice?
186996 by: Brian Dunning
186997 by: Richard Davey
186999 by: John W. Holmes
187009 by: Daniel Clark
187014 by: Rick Fletcher
187021 by: Tyler Replogle
clearing new pages
187000 by: michael young
187002 by: Jake Johnson
187015 by: Torsten Roehr
187020 by: Rick Fletcher
187023 by: John Kaspar
187024 by: Tyler Replogle
How do I use RewriteEngine for similar parameters?
187001 by: Jake Johnson
187004 by: raditha dissanayake
187006 by: Matt Matijevich
combining string values
187003 by: Tommy Atherton
187005 by: "Miguel J. Jim�nez"
Compiling PHP on a Itanium 64bits
187007 by: Toze Araujo
File Upload within form
187010 by: Tom Chubb
187013 by: Torsten Roehr
PHP Portlet API / Development ?
187012 by: [-^-!-%-
is_object($_SESSION['dagobertduck']);
187016 by: Matthias H. Risse
187018 by: Justin Palmer
187019 by: John W. Holmes
Possible Work in the Los Angeles Area...
187017 by: Domains4Days
187022 by: Tyler Replogle
PHP segfaults, any ideas?
187025 by: Michal Migurski
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 ---
Hello!
I have a problem that I hope someone can solve for me ;-)
I have two classes:
Class Test
{
Function Test()
{
print(�Hello Test�);
}
}
Class MyClass extends Test
{
Function Debug()
{
print(�Hello MyClass�);
}
}
>From my code I would like to make the following call: MyClass::Test(); -
This will obvious output �Hello Test�. But in the function Test::Test is
there anyway to know that MyClass::Test was called? I would like to get the
MyClass in a string, somehow. If other classes extended Test, it would be
that classes names.
Keep in mind that I don�t have an object to ask, since im just calling it
with MyClass::Test(), so $this will not work :-(
What I tried so far?
__CLASS__ This will return Test since its calling a function in the Test
class and not in MyCalss.
The use of $this � not working since im not calling it as an object, but to
the class directly.
Looking forward to someone poking me in the right direction :)
Lasse
--- End Message ---
--- Begin Message ---
Hiya,
How can i draw a new <tr> AFTER FIVE <td> in the following loop
(i want to echo the records in 5 columns width tables whatever the number of
records will be fetched)
..
echo '<table>';
while ($myrow = mysql_fetch_array($sql))
{
echo $myrow[0];
}
echo '</table>';
regards
--- End Message ---
--- Begin Message ---
echo '<table>';
echo '<tr>';
while ($myrow = mysql_fetch_array($sql))
{
echo '<td>';
echo $myrow[0];
echo '</td>';
}
echo '</tr>';
echo '</table>';
You did say you wanted 5 COLUMNS, not rows, in your table... right?
"nabil" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hiya,
>
> How can i draw a new <tr> AFTER FIVE <td> in the following loop
>
> (i want to echo the records in 5 columns width tables whatever the number
of
> records will be fetched)
>
> ..
> echo '<table>';
>
> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '</table>';
>
>
> regards
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
----- Original Message -----
From: "nabil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 26, 2004 8:28 AM
Subject: [PHP] dynamic table
> Hiya,
>
> How can i draw a new <tr> AFTER FIVE <td> in the following loop
>
> (i want to echo the records in 5 columns width tables whatever the number
of
> records will be fetched)
>
> ..
> echo '<table>';
>
> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '</table>';
>
>
> regards
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
--- End Message ---
--- Begin Message ---
$i = 0;
while ($myrow = mysql_fetch_array($sql)) {
if (++$i % 5 == 0) echo '<tr>';
...
Note: if used repeatedly do not increment the $i again in the loop.
HTH
Richard
-----Original Message-----
From: nabil
Sent: Wednesday, May 26, 2004, 2:28:28 PM
> Hiya,
> How can i draw a new <tr> AFTER FIVE <td> in the following loop
> (i want to echo the records in 5 columns width tables whatever the number of
> records will be fetched)
> ..
> echo '<table>';
> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '</table>';
> regards
--- End Message ---
--- Begin Message ---
* Thus wrote nabil ([EMAIL PROTECTED]):
> Hiya,
>
> How can i draw a new <tr> AFTER FIVE <td> in the following loop
>
> (i want to echo the records in 5 columns width tables whatever the number of
> records will be fetched)
>
> ..
> echo '<table>';
>
> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '</table>';
Use the modulus (%) operator.
$columns = 5; // Human readable number
$new_row = $columns - 1; // the magic number
$html_row = ''; // Column buffer
$i = 0; // Counter
echo '<table>';
while (...) {
$html_row .= "<td>{$myrow[0]}</td>";
// $i % $columns sequence will be:
// 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 ...
if ( ($i % $columns) == $new_row ) {
echo "<tr>$html_row</tr>";
$html_row = '';
$i++;
}
}
// if we are on a sequence number other than zero
// html_row will contain some columns.
if(($i % $columns) != 0) {
echo "<tr>$html_row</tr>";
}
echo '</table>';
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
>Hiya,
>
>How can i draw a new <tr> AFTER FIVE <td> in the following loop
>
>(i want to echo the records in 5 columns width tables whatever the number
of
>records will be fetched)
>
>..
>echo '<table>';
>
>while ($myrow = mysql_fetch_array($sql))
>{
>echo $myrow[0];
>}
>echo '</table>';
>
>
>regards
$i = 1;
echo '<table border=1>' . "\n";
echo '<tr>' . "\n";
while ($myrow = mysql_fetch_array($sql)){
echo '<td>' . $myrow[0]. "</td>\n";
if ($i % 5 == 0){
echo "</tr>\n<tr>";
}
$i++;
}
$odd = ($i - 1) % 5;
if ($odd){
echo '<td colspan="'.$odd.'"> </td>' . "\n";
}
echo '</tr>' . "\n";
echo '</table>' . "\n";
adrian
--- End Message ---
--- Begin Message ---
>
> >Hiya,
> >
> >How can i draw a new <tr> AFTER FIVE <td> in the following loop
> >
> >(i want to echo the records in 5 columns width tables whatever the number
> of
> >records will be fetched)
> >
> >..
> >echo '<table>';
> >
> >while ($myrow = mysql_fetch_array($sql))
> >{
> >echo $myrow[0];
> >}
> >echo '</table>';
> >
> >
> >regards
>
> $i = 1;
> echo '<table border=1>' . "\n";
> echo '<tr>' . "\n";
>
> while ($myrow = mysql_fetch_array($sql)){
>
> echo '<td>' . $myrow[0]. "</td>\n";
>
> if ($i % 5 == 0){
> echo "</tr>\n<tr>";
> }
>
> $i++;
> }
>
> $odd = ($i - 1) % 5;
> if ($odd){
> echo '<td colspan="'.$odd.'"> </td>' . "\n";
> }
> echo '</tr>' . "\n";
> echo '</table>' . "\n";
>
>
> adrian
sorry the $odd bit at the end aint right but you get the idea.
adrian
--- End Message ---
--- Begin Message ---
Very slick Richard.
>>$i = 0;
>>while ($myrow = mysql_fetch_array($sql)) {
>> if (++$i % 5 == 0) echo '<tr>';
>> ...
>>
>>
>>Note: if used repeatedly do not increment the $i again in the loop.
>>
>>HTH
>>Richard
--- End Message ---
--- Begin Message ---
Hi,
Wednesday, May 26, 2004, 10:21:57 PM, you wrote:
TR> if your not using cookies you have to pass the sessionid in your form
TR> as a hidden variable somewhere. Or maybe I missed it :)
TR> --
TR> regards,
TR> Tom
ok ignore me I found it
btw you can drop the ; it is not needed <?= SID?>
--
regards,
Tom
--- End Message ---
--- Begin Message ---
* Thus wrote strategies ([EMAIL PROTECTED]):
> Hi,
> I know this is a perennial problem but believe me i have googled and
> tried various solutions
> I've encounter many bb isps doing proxy caching that i cant get around.
> That is i want to completely avoid caching.
> I have tried all the header stuff ,both php headers and html headers.
What headers did you try?
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
> * Thus wrote strategies ([EMAIL PROTECTED]):
> > Hi,
> > I know this is a perennial problem but believe me i have googled and
> > tried various solutions
> > I've encounter many bb isps doing proxy caching that i cant get around.
> > That is i want to completely avoid caching.
> > I have tried all the header stuff ,both php headers and html headers.
>
> What headers did you try?
>
>
//php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
//html
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
adrian
--- End Message ---
--- Begin Message ---
Hi group,
I have discovered a strange behaviour while using
session. I have a page from which i am opening other
pages using target = "_blank" element. Now when i open
the child page, it doesn't get $_SESSION values. I
have tried to dump variable from $_SESSION and it
shows me the blank array. Does any one know this
strange behaviour?? Let me know if i am doing anything
wrong.
Thank you.
Regards,
Hardik Doshi
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
--- End Message ---
--- Begin Message ---
"Hardik Doshi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi group,
>
> I have discovered a strange behaviour while using
> session. I have a page from which i am opening other
> pages using target = "_blank" element. Now when i open
> the child page, it doesn't get $_SESSION values. I
> have tried to dump variable from $_SESSION and it
> shows me the blank array. Does any one know this
> strange behaviour?? Let me know if i am doing anything
> wrong.
Are you using cookies? If not you have to pass the session id via GET to the
new page:
<a href="page.php?<?= SID; ?>" target="_blank">link</a>
Regards, Torsten
--- End Message ---
--- Begin Message ---
Hello!
I need to print an image file, but I'm having some problems.
I have a handler to a printer witch I can print text correctly with the
printer_write function.
I can also print an image if it is in bmp format (printer_draw_bmp),
however, I want to print png files.
$im = imagecreatefrompng($url)
$handler = printer_open("PATH_TO_PRINTER");
if($handler){
printer_write($handler,$im);
printer_close($handler);
}
else{
//ERROR
}
In this example I can't print, because printer_write function just
prints text.
How can I print an image file?
Thank you!
--- End Message ---
--- Begin Message ---
How do I check for the presence of an optional $_GET param without
throwing a "Notice: Undefined index" when the param is not present?
Tried all three of these, they all produce the Notice when the param is
not passed:
if ($_GET['id'])
if ($_GET['id'] != "")
if (isset $_GET['id'])
--- End Message ---
--- Begin Message ---
Hello Brian,
Wednesday, May 26, 2004, 4:01:30 PM, you wrote:
BD> How do I check for the presence of an optional $_GET param without
BD> throwing a "Notice: Undefined index" when the param is not present?
BD> Tried all three of these, they all produce the Notice when the param is
BD> not passed:
BD> if ($_GET['id'])
BD> if ($_GET['id'] != "")
BD> if (isset $_GET['id'])
if (isset($_GET['id']))
{
$id = $_GET['id'];
}
Best regards,
Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I am not young enough to know everything." - Oscar Wilde
--- End Message ---
--- Begin Message ---
From: "Brian Dunning" <[EMAIL PROTECTED]>
> How do I check for the presence of an optional $_GET param without
> throwing a "Notice: Undefined index" when the param is not present?
>
> Tried all three of these, they all produce the Notice when the param is
> not passed:
>
> if ($_GET['id'])
> if ($_GET['id'] != "")
> if (isset $_GET['id'])
if(isset($_GET['id']))
or
if(!empty($_GET['id']))
depending upon what you want to do.
---John Holmes...
--- End Message ---
--- Begin Message ---
if (isset( $_GET['id']))
>>How do I check for the presence of an optional $_GET param without
>>throwing a "Notice: Undefined index" when the param is not present?
>>
>>Tried all three of these, they all produce the Notice when the param is
>>not passed:
>>
>>if ($_GET['id'])
>>if ($_GET['id'] != "")
>>if (isset $_GET['id'])
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
--- End Message ---
--- Begin Message ---
> >>How do I check for the presence of an optional $_GET param without
> >>throwing a "Notice: Undefined index" when the param is not present?
> >>
> >>Tried all three of these, they all produce the Notice when
> the param
> >>is not passed:
> >>
> >>if ($_GET['id'])
> >>if ($_GET['id'] != "")
> >>if (isset $_GET['id'])
> >>
>
> if (isset( $_GET['id']))
As a general note, isset( $array["key"] ) returns false if $array["key"] ===
NULL. You should use array_key_exists( "key", $array ) instead.
--Rick
--- End Message ---
--- Begin Message ---
aslo you could change it to something else like this
$_GET['id'] = $id;
if (!$id) {
// whatever you want to happen put here
}
From: "Daniel Clark" <[EMAIL PROTECTED]>
Reply-To: "Daniel Clark" <[EMAIL PROTECTED]>
To: "Brian Dunning" <[EMAIL PROTECTED]>,"[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
Subject: Re: [PHP] How to check for a $_GET without throwing a Notice?
Date: Wed, 26 May 2004 10:59:20 -0700
if (isset( $_GET['id']))
>>How do I check for the presence of an optional $_GET param without
>>throwing a "Notice: Undefined index" when the param is not present?
>>
>>Tried all three of these, they all produce the Notice when the param is
>>not passed:
>>
>>if ($_GET['id'])
>>if ($_GET['id'] != "")
>>if (isset $_GET['id'])
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page � FREE
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/
--- End Message ---
--- Begin Message ---
Hi,
a file called a.php prints "hello" to the browser then calls b.php
which prints "goodbye" to the browser.
the output looks like this:
hello
goodbye
how do I clear the screen so the end results looks like this:
goodbye
--- End Message ---
--- Begin Message ---
On Wed, May 26, 2004 at 11:20:33AM -0400, michael young wrote:
> Hi,
> a file called a.php prints "hello" to the browser then calls b.php
> which prints "goodbye" to the browser.
> the output looks like this:
>
> hello
> goodbye
>
> how do I clear the screen so the end results looks like this:
>
> goodbye
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Try using redirect to b.php
--
Jake Johnson
http://www.plutoid.com
--- End Message ---
--- Begin Message ---
"Michael Young" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> a file called a.php prints "hello" to the browser then calls b.php
> which prints "goodbye" to the browser.
> the output looks like this:
>
> hello
> goodbye
>
> how do I clear the screen so the end results looks like this:
a.php:
echo 'hello';
header('location: b.php'); exit;
Regards,
Torsten Roehr
--- End Message ---
--- Begin Message ---
> > Hi,
> > a file called a.php prints "hello" to the browser then calls
> > b.php which prints "goodbye" to the browser.
> > the output looks like this:
> >
> > hello
> > goodbye
> >
> > how do I clear the screen so the end results looks like this:
>
> a.php:
>
> echo 'hello';
> header('location: b.php'); exit;
That actually wouldn't work, because once there's output ("echo") you can't
send a header.
--Rick
--- End Message ---
--- Begin Message ---
I put this at the top of long pages,
$processing = "
<span id='processing'>
processing, please wait ...
</span>
";
echo $processing;
flush();
Then put this at the bottom,
$hide = "
<script language='javascript'>
if (document.layers) {
processing.visibility='hide'
} else if (document.all) {
document.all('processing').style.visibility='hidden'
} else {
document.getElementById('processing').style.display='none'
}
</script>
";
echo $hide;
Works pretty good.
- John
On 5/26/2004 10:20 AM, Michael Young wrote:
Hi,
a file called a.php prints "hello" to the browser then calls b.php
which prints "goodbye" to the browser.
the output looks like this:
hello
goodbye
how do I clear the screen so the end results looks like this:
goodbye
--- End Message ---
--- Begin Message ---
hey, you could use some jave script there
a.php:
echo 'hello';
echo"<script language=\"Javascript\"> window.location =
'http://www.yourwebsite.com/b.php'";
From: "Rick Fletcher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: [PHP] Re: clearing new pages
Date: Wed, 26 May 2004 12:52:55 -0700
> > Hi,
> > a file called a.php prints "hello" to the browser then calls
> > b.php which prints "goodbye" to the browser.
> > the output looks like this:
> >
> > hello
> > goodbye
> >
> > how do I clear the screen so the end results looks like this:
>
> a.php:
>
> echo 'hello';
> header('location: b.php'); exit;
That actually wouldn't work, because once there's output ("echo") you can't
send a header.
--Rick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Learn to simplify your finances and your life in Streamline Your Life from
MSN Money. http://special.msn.com/money/0405streamline.armx
--- End Message ---
--- Begin Message ---
Hello,
I am trying to use the RewriteEngine for the following two lines. One has one
parameter and the other has two?
http://www.plutoid.com/index.php?show=semi
http://www.plutoid.com/index.php?prd_id=5248&show=semi
Thanks in advance!
--
Jake Johnson
http://www.plutoid.com
--- End Message ---
--- Begin Message ---
Jake Johnson wrote:
Hello,
I am trying to use the RewriteEngine for the following two lines. One has one parameter and the other has two?
You might want to try an apache group. And you might want to read the
manual, particularly the examples before you post in an apache group.
http://www.plutoid.com/index.php?show=semi
http://www.plutoid.com/index.php?prd_id=5248&show=semi
Thanks in advance!
--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
--- End Message ---
--- Begin Message ---
[snip]
I am trying to use the RewriteEngine for the following two lines. One
has one parameter and the other has two?
[/snip]
this is more of an apache question you could get better answers on an
apache list
http://httpd.apache.org/docs/misc/rewriteguide.html
just check the first for prd_id first
RewriteCond %{REQUEST_URI} prd_id #you could probably get a better test
expression
rewrite your url
--- End Message ---
--- Begin Message ---
hi
I have a problem, I'm trying to combine the value of two strings
together into a final string. For example
$path = '/tmp/photos/';
$filename = 'pic1.jpg';
$finalvalue = $path + $filename; (I know that the + is not used its
there for explanation only)
The value for path will remain constant (for the time being at least
although) but the value for filename will be read from a database so
that will change.
Anyone care to help???
thanks in advance
Tommy
--- End Message ---
--- Begin Message ---
$finalvalue = $path.$filename;
Tommy Atherton wrote:
hi
I have a problem, I'm trying to combine the value of two strings
together into a final string. For example
$path = '/tmp/photos/';
$filename = 'pic1.jpg';
$finalvalue = $path + $filename; (I know that the + is not used its
there for explanation only)
The value for path will remain constant (for the time being at least
although) but the value for filename will be read from a database so
that will change.
Anyone care to help???
thanks in advance
Tommy
---
avast! Antivirus: Mensaje ENTRANTE limpio.
Base de datos de Virus (VPS): 0422-0, 25/05/2004
Fecha: 26/05/2004 17:57:17
--
Miguel J. Jim�nez
ISOTROL, S.A. (�rea de Internet)
Avda. Innovaci�n n�1, 3� - 41020 Sevilla (ESPA�A)
mjjimenez AT isotrol DOT com --- http://www.isotrol.com
ICQ# 12670750
TLFNO. 955036800 ext. 111
--- End Message ---
--- Begin Message ---
|
Does anybody knows how can i compile (or get a
compiled binary) for php that works on a Itanium runing on a Windows Server @ 64
bits?
I try searching for a gcc version for the Itanium
processor but i couln't found any avaliable, does anybody know were i can find
any compiler that works?
Thanks.
|
--- End Message ---
--- Begin Message ---
I am trying to design a custom form script and I've stumbled across a small
problem.
I want to implement a file upload into the form, but rather than posting to
another file I want to refresh the form and then show that there has been a
file uploaded.
I know about changing the form action to:
<form action="<?php echo$_SERVER['PHP_SELF']; ?>" method="post" name="form"
id="form">
But, what do I need to change to update the script?
I'm a newbie, but trying hard to learn!
Thanks in advance for any help.
Tom
<form action="upload.php" method="post" ENCTYPE="multipart/form-data">
<input type="file" size="60" name="spec">
<!-- set the max file size -->
<input type="hidden" name="MAX_FILE_SIZE" value="500000">
<input type="submit" value="upload">
</form>
<?php
//FILE UPLOAD SCRIPT
$file = $_POST[file];
$path = "/relative/directory/to/file"; //SET THIS TO THE RELATIVE PATH FROM
WHERE THE SCRIPT IS TO WHERE THE FILE SHOULD BE UPLOADED TO,
if($file){
print("File name: $file_name<P>/n");
print("File size: $file_size bytes<P>/n");
if(copy($file, "$path/$filename")){
print("Your File was uploaded successfully");
}else{
print("ERROR, your file was not successfully uploaded");
}
unlink($file);
}
?>
--- End Message ---
--- Begin Message ---
"Tom Chubb" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am trying to design a custom form script and I've stumbled across a
small
> problem.
> I want to implement a file upload into the form, but rather than posting
to
> another file I want to refresh the form and then show that there has been
a
> file uploaded.
>
> I know about changing the form action to:
> <form action="<?php echo$_SERVER['PHP_SELF']; ?>" method="post"
name="form"
> id="form">
>
> But, what do I need to change to update the script?
> I'm a newbie, but trying hard to learn!
>
> Thanks in advance for any help.
>
> Tom
>
>
> <form action="upload.php" method="post" ENCTYPE="multipart/form-data">
> <input type="file" size="60" name="spec">
> <!-- set the max file size -->
> <input type="hidden" name="MAX_FILE_SIZE" value="500000">
> <input type="submit" value="upload">
> </form>
>
>
> <?php
> file://FILE UPLOAD SCRIPT
> $file = $_POST[file];
> $path = "/relative/directory/to/file"; file://SET THIS TO THE RELATIVE
PATH FROM
> WHERE THE SCRIPT IS TO WHERE THE FILE SHOULD BE UPLOADED TO,
>
> if($file){
> print("File name: $file_name<P>/n");
> print("File size: $file_size bytes<P>/n");
This should be:
if (isset($_FILES) && isset($_FILES['spec'])) {
echo 'File name: ' . $_FILES['spec']['name'] . '<p>';
echo 'File size: ' . $_FILES['spec']['size'] . ' bytes<p>';
}
>
> if(copy($file, "$path/$filename")){
This should be:
if (copy($_FILES['file']['tmp_name'], "$path/$filename")) {
Regards,
Torsten Roehr
> print("Your File was uploaded successfully");
> } else{
> print("ERROR, your file was not successfully uploaded");
> }
> unlink($file);
> }
> ?>
--- End Message ---
--- Begin Message ---
I was wondering, are any of you working on a Portlet development with PHP?
Or, are you aware of any projects projects using Portlets? Any online
references? Any plans for Portlet support in PHP?
Please let me know.
Any references would be greatly appreciated.
_john
=P e p i e D e s i g n s
www.pepiedesigns.com
Providing Solutions That Increase Productivity
Web Developement. Database. Hosting. Multimedia.
--- End Message ---
--- Begin Message ---
hi:
i wonder why...
if(!is_object($_SESSION['xmlModel']))
echo "there is no obj present, juppa**";
at my place always results in TRUE or
echoing the "there is no.. ", even if var_dump
reports that $_SESSION['xmlModel'] is an
object.
did i screw something up or are there
special policies with the beloved session
variables?
i thought $_SESSION is just mapped
into memory from the session-container
during init on every request and at the end of the
script serialized back to the container?
maybe i missed special policies for
referencing objects stored in the
session-variable?
thanks!
/m
--- End Message ---
--- Begin Message ---
Hi,
Make sure you include the Class file in every consecutive page that you
would like to use the object in.
Regards,
Justin Palmer
-----Original Message-----
From: Matthias H. Risse [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 12:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] is_object($_SESSION['dagobertduck']);
hi:
i wonder why...
if(!is_object($_SESSION['xmlModel']))
echo "there is no obj present, juppa**";
at my place always results in TRUE or
echoing the "there is no.. ", even if var_dump
reports that $_SESSION['xmlModel'] is an
object.
did i screw something up or are there
special policies with the beloved session
variables?
i thought $_SESSION is just mapped
into memory from the session-container
during init on every request and at the end of the
script serialized back to the container?
maybe i missed special policies for
referencing objects stored in the
session-variable?
thanks!
/m
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
From: "Justin Palmer" <[EMAIL PROTECTED]>
> Make sure you include the Class file in every consecutive page that you
> would like to use the object in.
and include it before session_start(). Although if var_dump() is showing
it's an object, you're question of why is_object() fails is still valid.
---John Holmes...
--- End Message ---
--- Begin Message ---
Hello,
I hope it's OK that I put this email on this list.... I have some possible
Web design work in the Los Angeles Area... regarding PHP&MySQL.
If anyone wants to:
Can you call me ASAP to discuss the particulars?
Thanks,
Dave B.
Ph. 818 763-9988 - Cel: 818 314-8900
--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]
Check out some great Domain Names at:
http://www.domains4days.com
--- End Message ---
--- Begin Message ---
hey,
I'm not going to call you, but we can talk over the net with email. I also
have msn ([EMAIL PROTECTED]) and aim (catim2005). That goes for anyone that
want to talk. O and if see my buddy icon on aim don't be scared.
From: Domains4Days <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [PHP] Possible Work in the Los Angeles Area...
Date: Wed, 26 May 2004 12:14:32 -0700
Hello,
I hope it's OK that I put this email on this list.... I have some possible
Web design work in the Los Angeles Area... regarding PHP&MySQL.
If anyone wants to:
Can you call me ASAP to discuss the particulars?
Thanks,
Dave B.
Ph. 818 763-9988 - Cel: 818 314-8900
--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]
Check out some great Domain Names at:
http://www.domains4days.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN
Premium! http://join.msn.click-url.com/go/onm00200439ave/direct/01/
--- End Message ---
--- Begin Message ---
Hi -
I'm having some PHP segfault issues, and I can't seem to figure out what's
wrong. Kinda frustrating :) The script i'm using to test is really simple,
and as I tweak it to figure out the failure point, I'm finding that it
/seems/ to break more reliably based on the presence of code **after** a
call to exit. This seems counterintuitive to me.
Being a novice to gdb, I was hoping someone might help me to understand
this backtrace?
#0 0x4010d76e in chunk_free () from /lib/libc.so.6
#1 0x4010d548 in free () from /lib/libc.so.6
#2 0x4033cb87 in shutdown_memory_manager (silent=1, clean_cache=0) at
/usr/local/src/build/php-4.3.2/Zend/zend_alloc.c:532
#3 0x403236cc in php_request_shutdown (dummy=0x0) at
/usr/local/src/build/php-4.3.2/main/main.c:992
#4 0x40365001 in apache_php_module_main (r=0x8103a84, display_source_mode=0)
at /usr/local/src/build/php-4.3.2/sapi/apache/sapi_apache.c:60
#5 0x40365b7e in send_php (r=0x8103a84, display_source_mode=0, filename=0x0)
at /usr/local/src/build/php-4.3.2/sapi/apache/mod_php4.c:617
#6 0x40365bd2 in send_parsed_php (r=0x8103a84) at
/usr/local/src/build/php-4.3.2/sapi/apache/mod_php4.c:632
#7 0x08053c73 in ap_invoke_handler ()
#8 0x08068bf7 in process_request_internal ()
#9 0x08068c58 in ap_process_request ()
#10 0x0805fa95 in child_main ()
#11 0x0805fc40 in make_child ()
#12 0x0805fdb4 in startup_children ()
#13 0x0806042c in standalone_main ()
#14 0x08060c8f in main ()
#15 0x400b01c4 in __libc_start_main () from /lib/libc.so.6
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html
--- End Message ---