Merhaba, Ziyaretçi. Lütfen giriş yapın veya üye olun.
Aktivasyon mailiniz gelmediyse buraya tıklayın.
06, 2008, 09:08:48 am
42718 Mesaj 8080 Konu Gönderen: 17912 Üye
Son üye: userboys
Turk-Php.Com Forum  |  Yardım Forumları  |  Uygulama Yükleme, Kurulum ve Ayarları  |  Bunu nasil kurarim? « önceki sonraki »
Sayfa: [1] Yazdır
Yazan Konu: Bunu nasil kurarim?  (Okunma Sayısı 455 defa)
Realturka
Yeni Kullanıcılar
*
Offline Offline

Mesaj Sayısı: 1


Üyelik Bilgileri
Bunu nasil kurarim?
« : 01, 2007, 04:51:42 am »

Yaw bu sabah canım çok sıkıldı ve bi web sitesi yapayım dedim, ama HTML de PHP de bilmiyorum.. Dreamweaver yukledim, bikaç kodu okumayı başarabiliyorum gerçi ama şunu sayfaya ekleyemiyorum, nasıl yapılır?

Kod:
class RndImage{
/********************************************************************
* Random Image Class
* Version: 1.0
* Date: 9/9/2001
* License: GPL
* Author: einav brill
* Contact: einavb@email.com
* Description:
this simple class is used to show a random image from an array
* of image paths.
* Functions:
* setPath(image_path) is used to set the images path.
* insertRndImage(imgs) used to get a list of images path
* getRndImage() return a random image path
* Usage:
* $rndImg = new RndImage();
* $rndImg->setPath('images/rotating_images/');
* $rndImg->insertRndImage('image_1.jpg','image_2.jpg','image_3.jpg',etc..);
* HTML....<? echo $rndImg->getRndImage(); ?>.....HTML
**********************************************************************/
var $_path ;
var $_imgArray ;

function setPath($pathName){
$this->_path = $pathName;
}   

function insertRndImage($imgs)
{
$imgArraySize = func_num_args();
 for($imgNum=0;$imgNum<$imgArraySize;$imgNum++)
  {
  $this->_imgArray[$imgNum] = $this->_path.func_get_arg($imgNum);
  }
}

function getRndImage(){
srand ((double) microtime() * 1000000);
$rndValue = rand(0,sizeof($this->_imgArray)-1);
return $this->_imgArray[$rndValue];
 }
}

Yardımlarınız için teşekkürler
Logged
mustklc
PHP Stajyeri
**
Offline Offline

Mesaj Sayısı: 358



Üyelik Bilgileri WWW
Ynt: Bunu nasil kurarim?
« Yanıtla #1 : 26, 2007, 11:16:27 am »

Description:
*     this simple class is used to show a random image from an array
*    of image paths.
* Functions:
*   setPath(image_path) is used to set the images path.
*   insertRndImage(imgs) used to get a list of images path
*   getRndImage() return a random image path


diyor ki bu sinif, resim yollarini tasiyan bir dizideki resimleri rastgele gosterir. yani  diziye resimlerin yollarini eklemelisin. (/images/..gibi)

php bilmiyorsan hic ugrasma bence.  madem canin sıkılıca site yapmak isityorsun sana JOOMLA önerebilirim. burdan destek alabilirsin
Logged

online alisveris: www.akntarz.com
BÖTE forum: www.maxibote.com
Sayfa: [1] Yazdır 
« önceki sonraki »
Gitmek istediğiniz yer:  


Turk-Php.Com Forum | SMF Forum Software © 2005, Simple Machines LLC. All Rights Reserved.