[PHP-WIN] Include and require

2003-10-20 Thread Rinku Shivnani
Dear All,

Can any of you tell me what is the difference between include and require ?

Regards,
Rinku

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



php-windows Digest 20 Oct 2003 10:21:45 -0000 Issue 1965

2003-10-20 Thread php-windows-digest-help

php-windows Digest 20 Oct 2003 10:21:45 - Issue 1965

Topics (messages 21823 through 21829):

ADSI - PHP
21823 by: Pc Technics, Inc.

@ symbol
21824 by: Alan McDonald
21825 by: DvDmanDT
21826 by: Alan McDonald

Re: PDF creation on the fly.
21827 by: Rahman Haqparast

Re: Includes Q
21828 by: Rahman Haqparast

Include and require
21829 by: Rinku Shivnani

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 am an ASP developer, however, I want to throw ASP out the window, where
I can use PHP due to its portability. I am currently trying to create a web
app which utilizes ADSI, however, I can not seem to find any good intro
articles which explain how to go about using ADSI with PHP. I have seen the
COM support functions for windows, however, it seems to me that there is
little advantage to using PHP over ASP. If I am correct, even if I use PHP,
this app will still require the Win32 platform, correct? Why not use ASP
then? I hear some say that they feel PHP is faster and more stable than ASP,
however, what is the increase? Is this only notable on paper through
statistics, or is the performance gain notable by the human patience level?

  Anyone know of some good places to learn ADSI and PHP? How about some good
PHP articles for newbies in general...

Thanks alot!

- Jeremy
 Pc Technics, Inc.
 www.pc-technics.com
 100% Free Internet Hosting!
--- End Message ---
--- Begin Message ---
I've searched but cannot find in the PHP manual what the difference between
include and @include - can someone tell me?
thanks
alan
--- End Message ---
--- Begin Message ---
To display errors or not (if they show up that is)... The @ will disable
error-reporting...

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Alan McDonald" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> I've searched but cannot find in the PHP manual what the difference
between
> include and @include - can someone tell me?
> thanks
> alan
--- End Message ---
--- Begin Message ---
thanks
"Dvdmandt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To display errors or not (if they show up that is)... The @ will disable
> error-reporting...
>
> -- 
> // DvDmanDT
> MSN: [EMAIL PROTECTED]
> Mail: [EMAIL PROTECTED]
> "Alan McDonald" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > I've searched but cannot find in the PHP manual what the difference
> between
> > include and @include - can someone tell me?
> > thanks
> > alan
--- End Message ---
--- Begin Message ---
Try this site-> www.fpdf.org
"Ferhat" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I have a php/ mysl web sites. I have one page of timeseries wchih I plot
> with Gnuplot as JPG.
>
> Now, I would to add a "save as PDF" button to this page. What I was
dreaming
> is when you click on the button the same HTML page will be saved as PDF.
>
> BUT, I tried HTML_ToPDF code and I could not doit. It needs lots of stuff
> with Perl support, which I do not have on my Windows XP Apache server.
>
> What shall I do? Any easy way to make HTML2PDF conversation???
>
> TIA
--- End Message ---
--- Begin Message ---
you can use relative addressing like .../../ and like this. Each ../ goes
one folder up.

Good Luck

"Alan McDonald" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I now this is old and I've searched and found answers to this issue but
> justa as a reality check..
>
> includes are only done via fully qualified filesystem paths or fully
> qualified URLs?
>
> this is one solution
> 
>
> Is there no such thing as relative URL includes?
>
> thanks
> Alan
--- End Message ---
--- Begin Message ---
Dear All,

Can any of you tell me what is the difference between include and require ?

Regards,
Rinku
--- End Message ---


RE: [PHP-WIN] Include and require

2003-10-20 Thread David Felton
if an include fails for whatever reason the script will continue executing
and just issue a warning.
If a require fails the script will throw an error and exit (it won't execute
the remainder of the script).

-Original Message-
From: Rinku Shivnani [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 11:22
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Include and require


Dear All,

Can any of you tell me what is the difference between include and require ?

Regards,
Rinku

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


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**



[PHP-WIN] Mail with Word attachment

2003-10-20 Thread George Pitcher
Hi all,

I need to send MS Word attachments from PHP (they're built on the fly).

I've tried PHPMailer but that doesn't like my NT box so I've gone back to
php's mail() function.

I'm using the following script but and the attachment is in the same
webfolder as the script but when I check the email, the attachment is
there - but blank.


$border="--==_856811060==_";
$recipient = "[EMAIL PROTECTED]";// . ", ";
$subject = "Birthday Reminders for August";
$message = "$border\n";
$message .= "Content-Type: text/plain; charset=us-ascii;format=flowed\n";
$message .= "The following email includes a formatted ASCII table\n";
$message .= "Day \t\tMonth \t\tYear\n";
$message .= "3rd \t\tAug \t\t1970\n";
$message .= "17rd\t\tAug \t\t1973\n";
$message .= "$border\n";
$headers = "From: Birthday Reminder <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n"; // Return path for errors
$headers .= "Mime-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"$border\"\n";
$headers .= "Content-Type: application/msword; name=\"Introduction.doc\"\n";
$headers .= "Content-Transfer-Encoding: base64\n";
$headers .= "Content-Disposition: attachment;
filename=\"Introduction.doc\"\n";
mail($recipient, $subject, $message, $headers);

Any suggestions?

George in Oxford

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



[PHP-WIN] SID in LDAP

2003-10-20 Thread Gísli
How can I get Unique ID from each user in LDAP, like the sid.  Because I´m
making an database that stores every user Unique ID.

Please Reply !!!

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



RE: [PHP-WIN] Include and require

2003-10-20 Thread Rinku Shivnani
Hi David,

Can you explain me the same thing with some examples.. Pls.


Regards,
Rinku

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



[PHP-WIN] RE: Include and require

2003-10-20 Thread manon
Difference is in the way they handle a failure.Require gives a fatal
error and processing of the page halts, while include continues
processing the page. More info in the PHP online manual
http://www.php.net/docs.php

-Oorspronkelijk bericht-
Van: Rinku Shivnani [mailto:[EMAIL PROTECTED] 
Verzonden: maandag 20 oktober 2003 12:22
Aan: [EMAIL PROTECTED]
Onderwerp: Include and require


Dear All,

Can any of you tell me what is the difference between include and
require ?

Regards,
Rinku

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



Re: [PHP-WIN] Include and require

2003-10-20 Thread Luis Moreira
Browse through http://ww.php.net , search and read the documentation.
If you do that and search for "include", for instance, you will find
The documentation below also applies to require(). The two constructs are
identical in every way except how they handle failure. include() produces a
Warning while require() results in a Fatal Error. In other words, use
require() if you want a missing file to halt processing of the page.
include() does not behave this way, the script will continue regardless. Be
sure to have an appropriate include_path setting as well.



Luis

- Original Message -
From: "Rinku Shivnani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 20, 2003 11:21 AM
Subject: [PHP-WIN] Include and require


> Dear All,
>
> Can any of you tell me what is the difference between include and require
?
>
> Regards,
> Rinku
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



[PHP-WIN] Re: Mail with Word attachment

2003-10-20 Thread Manuel Lemos
Hello,

On 10/20/2003 08:44 AM, George Pitcher wrote:
Hi all,

I need to send MS Word attachments from PHP (they're built on the fly).

I've tried PHPMailer but that doesn't like my NT box so I've gone back to
php's mail() function.
I'm using the following script but and the attachment is in the same
webfolder as the script but when I check the email, the attachment is
there - but blank.
You may want to try this class instead:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-WIN] Re: PHP 5 And Apache2.0.47

2003-10-20 Thread tim sawyers
I did a clean install of windows XP so no version of php was running. I did
try just changing the looadModule to PHP4, which gave me an error "module
not found". I did try every way of loading php-sapi I could find in the
decimation including dropping php4ts.dll in the sapi directory.



>From an email i got it looks like PHP5's apache2 dill is called
php5apache2.dll which is not included with the beta1 or current snapshot
"php5-win32-200310172230".



I did drop back to the  4-code base and the setup went fine and works with
LoadModule php4_module C:/www/php/php4apache2.dll



I run my sever as a hobby so I like being on the bleeding edge. To bad I
bled to death:(  The clean install was to move my server back to windows XP
from Mandrak Linux.



If anyone gets this combo to work drop me an email and let me know how you
did it. [EMAIL PROTECTED]
"Manon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 1)Check if you don't have an instance of php.exe running for some reason
> when you load apache
> 2)try  using LoadModule php4_module  (not LoadModule php5) The module
> might for some reason be called Module php4 internally
> 3) put php4apache2.dll  in c:/php/sapi/php4apache2.dll  (wherever your
> sapi dir is) and put a copy of the php4ts.dll  the same dir
> 4) try the latest snapshot from http://snaps.php.net/
>
> Just for curiosity: why are you tryning PHP 5? Version 4.3.3 with the
> latest snapshot  appears to be pretty stable on Apache or did you
> encounter any specific problems with 4.3.3?
>
>
> -Oorspronkelijk bericht-
> Van: tim sawyers [mailto:[EMAIL PROTECTED]
> Verzonden: zaterdag 18 oktober 2003 5:02
> Aan: [EMAIL PROTECTED]
> Onderwerp: PHP 5 And Apache2.0.47
>
>
> I am having trouble installing php5 with apache 2.0.47
>
> The setup of apache whent with out a hitch and tested fine.
>
> But i can not get the php4apache2.dll to loud? it bombs out with syntex
> error in hhtp.conf : php4apche2.dill moduel can not be found.
>
> I Have tryed every think i can think of to get it to work inclouding: I
> put bot php4apache2.dll and php4ts.dll in the apache\model folder and
> used LoadModule php5_module modules/php4apache2.dll.
>
> I left the php4apache2.dll in C:\www\php\sapi folder moved the
> php4ts.dll to the sapi folder and used LoadModule php5_module
> c:/www/php/sapi/php4apache2.dll.
>
> also tryed the above with  php4ts.dll in systom and systome32
>
> then i whent of the handel and tryed LoadModule php5_module
> C\www\php\sapi\php4apache2.dll. and LoadModule php5_module
> "C/www/php/sapi/php4apache2.dll"
>
> then i moved both dll's to c:\www\php\ and tryed LoadModule php5_module
> C/www/php/php4apache2.dll
>
> my php.ini file is in C:\www\php along with php.exe i have a copy of
> php4apace2.dll and php4ts.dll in systome, systome32, C\www\php, and
> C:\www\apache\model.
>
> Howe do i make this work?

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



Re: [PHP-WIN] Problem with $GLOBALS

2003-10-20 Thread joe
can you explain why register globals is a big security risk??

if you have register globals on and a user goes to
http://www.site.com/index.php?visitor=10
$visitor is set to 10 so yes they can change the integer for visitor
but even with register globals off they can change it there too. cause
you script just does $_POST['visitor'] it still retrieves the same
value from the querystring, that is unless you use GET instead of POST

also which is better and more secure to use GET or POST???

Joe Crawford Jr.


On Sun, 18 May 2003 11:58:01 +0100, [EMAIL PROTECTED]
(Stephen) wrote:

>Of more use is probably a description of how things now work. Register
>Globals represents quite a large security risk to PHP scripts as it allows a
>visitor to your site to define the value of ANY variable. Instead, there are
>now a fixed number of "super global arrays". Rather than defining lots of
>individual variables, all pre-script defined variables are put into one big
>array. Its easier to understand with an example
>
>A user goes to http://mysite.com/index.php?visitorid=10
>
>with register globals, this defines $visitorid as '10'
>
>without register globals, the only way to access this data is by using
>$_GET['visitorid']
>
>The later example is the preferd use, I strongly suggest learning to use it.
>BTW, you are using the same book I used! I thought it was quite a good one,
>although since then i've picked a lot up from the php manual and this
>helplist.
>
>$_POST[''] for all post variables - eg 
>$_GET[''] for all get variables, that is variables from the url (as above)
>$_SESSION[''] for all session variables. Sessions have changed a lot since
>the book was written.
>
>Those are the three main ones. I would give you a link to the correct page
>in the php manual but it appears to be down at the moment!
>
>Stephen
>
>- Original Message - 
>From: "Jim George" <[EMAIL PROTECTED]>
>To: "Jennifer S." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Sunday, May 18, 2003 8:26 AM
>Subject: RE: [PHP-WIN] Problem with $GLOBALS
>
>
>> Jenifer,
>>
>> thanks for that, worked beautifully.
>>
>> Jim
>>   -Original Message-
>>   From: Jennifer S. [mailto:[EMAIL PROTECTED]
>>   Sent: 18 May 2003 05:43
>>   To: Jim George; [EMAIL PROTECTED]
>>   Subject: Re: [PHP-WIN] Problem with $GLOBALS
>>
>>
>>   The book assumes that you have "register globals" set to "on" in your
>> php.ini file. By default it's off now. Change it to "on" and you should be
>> OK.
>>
>>   Cheers,
>>   Jennifer
>>
>>
>>   Jim George <[EMAIL PROTECTED]> wrote:
>> Folks,
>>
>> I'm a total newbie with PHP and I've been working through "SAMS Teach
>> yourself PHP in 24 hours".
>> I got to Hour 9 where they introduced the concept of predefined
>> variables
>> and the $GLOBALS variable. Neither of these appear to work generating
>> all
>> sorts of errors.
>> Please find below a listing. Can someone help me please?
>> Thanks.
>>
>> Jim
>>
>>
>> print "
>> Let's try that loop again
>> ";
>> $user1="Harry";
>> $user2="Mary";
>> $user3="Bob";
>>
>> foreach($GLOBALS as $key=>$value){
>> print "\$GLOBALS[\"$key\"] == $value";
>> }
>> ?>
>>
>>
>>
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>>
>>
>> --

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



Re: [PHP-WIN] Re: can not get variable value from HTML form

2003-10-20 Thread joe
instead of using $username use $_POST['username'] sounds to me like
you have register globals off on your devel machine and turned on on
your production machine...  From what i am told it is best to develop
with register globals OFF i always config my php to have that off.

Joe

On Wed, 31 Dec 1969 16:00:00  (), [EMAIL PROTECTED] wrote:

>
>look at this
>href="http://www.php.net/manual/en/security.registerglobals.php";>http://www.php.net/manual/en/security.registerglobals.php
>
>"Emmy Chen" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>> I DON'T have this problem with my development machine until I deploy the
>> code to the production.
>>
>> I am using window XP home edition.   I tried both apache-2.0.45 and
>> apache -1.3.27 with both php-4.3.1 and php-4.3.2.  and none of them
>works.
>>
>> the phpinfo(); works fine without any problem.
>>
>> but I could not get the variable value from the html FORM.
>>
>> the test program is, the link is href="http://www.kuaitech.com/test.php";>http://www.kuaitech.com/test.php
>>
>> 
>> > $user="GUEST";
>> echo ($user);
>> ?>
>> 
>> Please type your name: 
>> 
>> 
>> 
>> You typed:
>> > echo ($username);
>> ?>
>> 
>>
>> As you can see, I can get the value for $user which is defined within
>the
>> php code, but I can not get the value for $username from html form.
>>
>> Many thanks.
>>
>> Emmy
>>

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



[PHP-WIN] Register Globals

2003-10-20 Thread Trystano
Just out of curiosity, if I was to work with register_globals set to on (on 
my home/testing/devel server), and then transfer my scripts across to a hosting 
server for them to be run live, will my scripts run if the PHP.ini file is 
configured to have register_globals set to off?

Tryst

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



php-windows Digest 20 Oct 2003 23:50:02 -0000 Issue 1966

2003-10-20 Thread php-windows-digest-help

php-windows Digest 20 Oct 2003 23:50:02 - Issue 1966

Topics (messages 21830 through 21840):

Re: Include and require
21830 by: David Felton
21833 by: Rinku Shivnani
21834 by: manon
21835 by: Luis Moreira

Mail with Word attachment
21831 by: George Pitcher
21836 by: Manuel Lemos

SID in LDAP
21832 by: Gísli

Re: PHP 5 And Apache2.0.47
21837 by: tim sawyers

Re: Problem with $GLOBALS
21838 by: joe.traptfans.com

Re: can not get variable value from HTML form
21839 by: joe.traptfans.com

Register Globals
21840 by: Trystano.aol.com

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 ---
if an include fails for whatever reason the script will continue executing
and just issue a warning.
If a require fails the script will throw an error and exit (it won't execute
the remainder of the script).

-Original Message-
From: Rinku Shivnani [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 11:22
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Include and require


Dear All,

Can any of you tell me what is the difference between include and require ?

Regards,
Rinku

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


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**

--- End Message ---
--- Begin Message ---
Hi David,

Can you explain me the same thing with some examples.. Pls.


Regards,
Rinku
--- End Message ---
--- Begin Message ---
Difference is in the way they handle a failure.Require gives a fatal
error and processing of the page halts, while include continues
processing the page. More info in the PHP online manual
http://www.php.net/docs.php

-Oorspronkelijk bericht-
Van: Rinku Shivnani [mailto:[EMAIL PROTECTED] 
Verzonden: maandag 20 oktober 2003 12:22
Aan: [EMAIL PROTECTED]
Onderwerp: Include and require


Dear All,

Can any of you tell me what is the difference between include and
require ?

Regards,
Rinku
--- End Message ---
--- Begin Message ---
Browse through http://ww.php.net , search and read the documentation.
If you do that and search for "include", for instance, you will find
The documentation below also applies to require(). The two constructs are
identical in every way except how they handle failure. include() produces a
Warning while require() results in a Fatal Error. In other words, use
require() if you want a missing file to halt processing of the page.
include() does not behave this way, the script will continue regardless. Be
sure to have an appropriate include_path setting as well.



Luis

- Original Message -
From: "Rinku Shivnani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 20, 2003 11:21 AM
Subject: [PHP-WIN] Include and require


> Dear All,
>
> Can any of you tell me what is the difference between include and require
?
>
> Regards,
> Rinku
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi all,

I need to send MS Word attachments from PHP (they're built on the fly).

I've tried PHPMailer but that doesn't like my NT box so I've gone back to
php's mail() function.

I'm using the following script but and the attachment is in the same
webfolder as the script but when I check the email, the attachment is
there - but blank.


$border="--==_856811060==_";
$recipient = "[EMAIL PROTECTED]";// . ", ";
$subject = "Birthday Reminders for August";
$message = "$border\n";
$message .= "Content-Type: text/plain; charset=us-ascii;format=flowed\n";
$message .= "The following email includes a formatted ASCII table\n";
$message .= "Day \t\tMonth \t\tYear\n";
$message .= "3rd \t\tAug \t\t1970\n";
$message .= "17rd\t\tAug \t\t1973\n";
$message .= "$border\n";
$headers = "From: Birthday Reminder <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n"; // Return path for errors
$headers .= "Mime-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"$border\"\n";
$headers .= "Content-Type: application/msword; name=\"Introduction.doc\"\n";
$headers .= "Content-Transfer-Encoding: base64\n";
$headers .= "Content-Dispo

[PHP-WIN] Re: Register Globals

2003-10-20 Thread DvDmanDT
That depends on if you use the globals or not And if you don't, no use
to have it turned on...

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
<[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED]
> Just out of curiosity, if I was to work with register_globals set to on
(on
> my home/testing/devel server), and then transfer my scripts across to a
hosting
> server for them to be run live, will my scripts run if the PHP.ini file is
> configured to have register_globals set to off?
>
> Tryst

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