PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Can I do this? I get an error, is there a better way to do it? Thank You.
class test{
public function __construct(){
$this->testing = new testing();
}
}
class testing{
public function __construct(){
$this->test = new test();
}
}
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
<?php
class Test
{
private $testing;
public function __construct ()
{
$this->testing = new testing();
}
}
class Testing
{
private $test;
public function __construct ()
{
$this->test = new test();
}
}
$test = new Test;
$testing = new Testing;
?>
<?php
class Test
{
private $testing;
public function __construct ()
{
$this->testing = new Testing();
}
}
class Testing
{
private $test;
public function __construct ()
{
$this->test = new Test();
}
}
$test = new Test;
$testing = new Testing;
?>
google returns the below when searching for the error message..
i couldn't get it work as well. I would receive "Today is //". This is what I did to correct the problem. 1)I'm using Win XP pro Service pack 1, PHP 5.0.3RC1, Apache 2.0.52. I did not move the "php5ts.dll" to c:\windows BUT to c:\windows\system32. 2) Go to this PHP link and follow the directions on this page http://www.php.net/manual/en/install.wi ... pache2.php 3) Next edit the index.php file you created in step 1(above)and delete the line and replace it with <?php phpinfo () ; ?> then save this file. Then open http://localhost you should have a graphical list of all your PHP info this file is much more useful then the file above. If it did not work then you need to go through the step 6 Configuring PHP5 with Apache (UP TO STEP 4 ONLY) then follow the link I have above and double check your settings again. Good Luck hope works for you. I spent 2 days trying to get this thing to work.