php Error

Setelah seharian mencari sebab akibat dari aplikasi php yang mengeluarkan pesan : PHP Error : Creating Default Project From Empty Value, akhirnya berkat bantuan paman Google.com menemukan keterangan dan solusi sebagai berikut :

Creating Default Project From Empty Value” yang keluar dari PHP Error dikarenakan pernyataan atau kode seperti ini :

<code> $object->foo = ‘bar’; </code>

Agar pernyataan tersebut tidak mengeluarkan pesan kesalahan ( yang menganggu ) dalam program php tersebut, maka harus dirubah menjadi :

<code>// inisialisasi sebagai Class Standar

$object = new stdClass();

// Lakukan pernyataan

$object->foo = ‘bar’; </code>

Pesan kesalahan lainnya adalah :

“Strict Standards : Only Variables Be Passed By Reference …. “

contoh :

<code> function readint() {
if ($this->BYTEORDER == 0) {
// low endian
//return array_shift(unpack(‘V’, $this->STREAM->read(4))); // will show the php error
$lilEn_arr = unpack(‘V’,$this->STREAM->read(4)); // correction
return array_shift($lilEn_arr); // correction
} else {
// big endian
//return array_shift(unpack(‘N’, $this->STREAM->read(4))); //will show the php error
$bigEn = array_shift(unpack(‘N’, $this->STREAM->read(4))); // correction
return $bigEn; // correction
}
}</code>
Semoga bisa bermanfaat

About admin

It's not just about a simple matters or it's a complicate matters. It's about how we share each other, the knowledges, the experieces and anythings can be shared for human kind. I wish i could share with as much as i can share and i have. It's very nice to share each other.

12. April 2010 by admin
Categories: Experieces | Tags: , , | Leave a comment

Leave a Reply

Required fields are marked *

*