What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP trouble

PHP trouble
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: PHP trouble
quote:
Originally posted by rav0
Apparantly, if in file1.php, you define a something, and then include file2.php, whatever you defined in file1.php doesn't work. file2.php gets processed by itself, and then pasted into file1.php. You will need to define something in file2.php for it to work, you can't define it in file1.php and include file2.php.
That's nonsense. :p Or, at least, there's more to it than that.

Quick test... file1.php
code:
<?php
class wdz {
    var $lazy = 'very lazy';
}
$wdz = new wdz;
require './file2.php';
?>
file2.php
code:
<?php
echo $wdz->lazy;
?>
Executing file1.php will echo the string as expected.
02-12-2006 08:30 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP trouble - by brian on 02-11-2006 at 09:33 PM
RE: PHP trouble - by J-Thread on 02-11-2006 at 11:02 PM
RE: PHP trouble - by rav0 on 02-12-2006 at 08:10 AM
RE: PHP trouble - by WDZ on 02-12-2006 at 08:30 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On