Include Curlfile Brings Yii Include Error


            $ch = curl_init();

            curl_setopt($ch, CURLOPT_URL, $url);

            $data = array('name' => $this->datei);

            // Yii Conflict

            $data["filecontent"] = new CurlFile($this->datei_path, 'application/pdf', $this->datei);

            $header = array('Content-type: multipart/form-data');

            curl_setopt($ch, CURLOPT_POST, true);

            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

            curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

            $json = curl_exec($ch);

            $r = json_decode($json);


I’m trying to realize a POST Upload with Yii and curl with the Code above. With PHP 5.3.27 i get an error:

include(CurlFile.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

I think Yii is trying to include CurlFile.php which is in fact a PHP Function since 5.5.0 - what can i do to prevent this?


OK, Sorry, i got the Problem

5.5.0 > 5.3.27