How to call a php static function and pass values to it
<p>I know this might be a basic question but when I google it ,found different solutions for different php versions..in brief without wasting your time I have a.
class `</p>

<pre><code>class UploadHandler
{
    protected $options; 
    public static $path;

public $prop1='';  
function __construct($options=null,$x){
$this-&gt;prop1  = $x;
    $this-&gt;options = array(
        'script_url' =&gt; $this-&gt;getFullUrl().'/',
        'upload_dir' =&gt; dirname($_SERVER['SCRIPT_FILENAME']).$this-&gt;getPath(),
        'upload_url' =&gt; $this-&gt;getFullUrl().$this-&gt;getPath(),` ....and so on
</code></pre>

<p>AND methods inside it:</p>

<pre><code>public function getPath() 
    {

return self::$path;
}

static public function setPath($autoSave)
</code></pre>

<p>{</p>

<pre><code>self::$path = $autoSave;
</code></pre>

<p>}</p>

<p>and in another place I do this:
<code>require('upload.class.php');</code>.......//the above class consists inside this</p>

<pre><code>UploadHandler::setPath('/files/');
</code></pre>

<p>why doesn't it  work...??..please help me or guide me to a better tutorial</p>
