求一个简单的php程序来学习,或者一个简单的php小网站,别整那些大型CMS,或者整一个简单的PHP程序考考我也行,我刚学PHP学到类和对象感觉这里很难!所以停下来温习下前面的!

解决方案 »

  1.   

    去chinaz A5里,应该有很多源码吧!
      

  2.   

    这个网站的源码质量很高。
    http://www.codefans.net/sort/list_2_1.shtml
      

  3.   

    搭建好环境,你也就会写了。基本语法看下。
    1、可以这么写test.php<?php 
    phpinfo();
    ?>
    2、也可以这么写
    test.php
    <html>
    <head>
    </head>
    <body>
    <?php
    function abc(){
        if( true ){
            $domain = "local var";
        }
        echo $domain;
    }
    abc();
    ?>
    </body>
    </html>再以后看看Zend 再搭建个环境。跑个例子。
      

  4.   

    当然到以后你也可以这么写<?php
    class A
    {
        function foo()
        {
            if (isset($this)) {
                echo '$this is defined (';
                echo get_class($this);
                echo ")\n";
            } else {
                echo "\$this is not defined.\n";
            }
        }
    }class B
    {
        function bar()
        {
            A::foo();
        }
    }$a = new A();
    $a->foo();
    A::foo();
    $b = new B();
    $b->bar();
    B::bar();
    ?>
      

  5.   

    像这样的问题干嘛不去google或者百度搜索呢