Forum Sementara Putera.com

Bersama kita perkemaskan forum ini sementara forum asal dalam pemulihan.

Forum putera dah kembali. Masalah sudah berjaya diselesaikan. Sila lawati http://forum.putera.com/tanya


    PHP expert

    Share

    kou
    Guest

    PHP expert

    Post by kou on Tue Feb 17, 2009 10:43 am

    anyone..sape tau cmne nk create folder & subfolder in website
    sy tgh develop 1 web portal & i need to create the filing system for the documents in the portal
    can anybody help me...plizzzzz!!!!! Sad

    yurckk
    Ahli Baharu
    Ahli Baharu

    Number of posts : 227
    Age : 32
    Location : Middle Earth
    Registration date : 17/02/2009

    Re: PHP expert

    Post by yurckk on Tue Feb 17, 2009 11:37 am

    ada pakai FTP program x? Nk create folder or subfolder je kan?

    try pakai coreFTP (Free) and connect to web.

    nanti akan ade susunan file2 dalam hosting ang. then just buat

    folder mcm buat folder biasa dlm pc je. right click and create new folder.

    kou
    Guest

    Re: PHP expert

    Post by kou on Tue Feb 17, 2009 4:07 pm

    if xde ftp....cmne?? i'm a beginner so i'm not familiar with this filing system...sedey je... Crying or Very sad

    yurckk
    Ahli Baharu
    Ahli Baharu

    Number of posts : 227
    Age : 32
    Location : Middle Earth
    Registration date : 17/02/2009

    Re: PHP expert

    Post by yurckk on Tue Feb 17, 2009 4:26 pm

    http://www.coreftp.com/download.html - download Free ftp program kt sini

    http://www.coreftp.com/doc/ - and nk blaja pasal core ftp

    kou
    Guest

    Re: PHP expert

    Post by kou on Tue Feb 17, 2009 4:39 pm

    thanx for your help... i'll try first...
    thanx again..... cherry

    yurckk
    Ahli Baharu
    Ahli Baharu

    Number of posts : 227
    Age : 32
    Location : Middle Earth
    Registration date : 17/02/2009

    Re: PHP expert

    Post by yurckk on Tue Feb 17, 2009 4:49 pm

    blaja PHP ke? np topic PHP while soalan btol lain?

    kou
    Guest

    Re: PHP expert

    Post by kou on Tue Feb 17, 2009 5:44 pm

    actually mmg tgh develop web gn php... Laughing

    ayu_raudhah
    Ahli Baharu
    Ahli Baharu

    Number of posts : 3
    Registration date : 06/03/2009

    Re: PHP expert

    Post by ayu_raudhah on Fri Mar 06, 2009 2:49 pm

    salam..
    cmne ek coding php utuk check box??
    ad sape2 tau x..
    bg cth yg sng nk phm ke...
    sbb da try wat tp die msuk 1 je lam database..
    walhal kte klik byk kt check box 2..
    anyone can help me?? Sad

    SHiDi
    Ahli Baharu
    Ahli Baharu

    Gender : Male Number of posts : 30
    Age : 32
    Location : Ampang
    Job/hobbies : Geek
    Registration date : 03/03/2009

    Re: PHP expert

    Post by SHiDi on Sat Mar 07, 2009 2:47 pm

    ayu_raudhah wrote:salam..
    cmne ek coding php utuk check box??
    ad sape2 tau x..
    bg cth yg sng nk phm ke...
    sbb da try wat tp die msuk 1 je lam database..
    walhal kte klik byk kt check box 2..
    anyone can help me?? Sad

    Nama checkbox tu semua mesti sama. Gunakan array. Rujuk: PHP + MySQL + jQuery: Deleting multiple selections | World Of Mine

    ayu_raudhah
    Ahli Baharu
    Ahli Baharu

    Number of posts : 3
    Registration date : 06/03/2009

    Re: PHP expert

    Post by ayu_raudhah on Wed Mar 11, 2009 10:51 am

    ok thanx..i'm try... Very Happy

    ayu_raudhah
    Ahli Baharu
    Ahli Baharu

    Number of posts : 3
    Registration date : 06/03/2009

    Re: PHP expert

    Post by ayu_raudhah on Sun Mar 15, 2009 2:20 am

    klo nk pggil dr table dtabase by row cmne plk?hihi

    puteriviolet
    Ahli Baharu
    Ahli Baharu

    Number of posts : 1
    Registration date : 01/03/2009

    Re: PHP expert

    Post by puteriviolet on Sun Mar 22, 2009 12:31 am

    salam..anyone..ade x y th nk pnggil dr table databse then nk ltk fungsi download pdf???upload i dh jd..tp utk download ni xbe fhm fungsinya sbb nk sertakn dgn pnggil table tu....

    please help..sape2 yg th..

    XShimeX
    Ahli Baharu
    Ahli Baharu

    Number of posts : 2
    Registration date : 22/03/2009

    Re: PHP expert

    Post by XShimeX on Sun Mar 22, 2009 10:03 pm

    puteriviolet wrote:salam..anyone..ade x y th nk pnggil dr table databse then nk ltk fungsi download pdf???upload i dh jd..tp utk download ni xbe fhm fungsinya sbb nk sertakn dgn pnggil table tu....

    please help..sape2 yg th..

    Hi, wasalam . Laughing

    Adakah u bermaksud dengan mengunakan Based SQL Query dan Header(download file).
    Contoh : Check daripada Database adakah table ID itu wujub, kemudian jika wujub, akan auto download file yang dikehendaki.

    Contoh Script :

    Code:

    <?php

    $sql = mysql_connect('localhost','root','PASSWORD DISINI') or die ("Gagal connect ke SQL Server");
    $db = mysql_select_db('file') or die ("Gagal pilih database");


    $id = $_GET['id'];

    if($id)
    {

    if(is_numeric($id))
    {
    $query = mysql_query("SELECT id,file_name FROM files WHERE id = '$id'") or die (mysql_error());


    $check = mysql_num_rows($query);

    if($check == '1')
    {


    $data = mysql_fetch_object($query);

    $filenames = $_SERVER['DOCUMENT_ROOT'] . "/$data->file_name.pdf";

    if(file_exists($filenames))
    {

    header("Cache-Control: public");
    header("Content-Description: File Transfer");
    header('Content-disposition: attachment; filename='.basename("$filenames"));
    header("Content-Type: application/pdf");
    header("Content-Transfer-Encoding: binary");
    header('Content-Length: '. filesize($filenames));
    readfile($filenames);
    }
    else
    {

    echo "Files tidak wujub";
    }

    }
    else
    {
       echo "ID Tidak Wujub";
    }

    }
    else
    {
    echo "ID Salah :)";
    }

    }
    else
    {
       echo "Apa sahaja disini :)";
    }

    ?>


    SQL Table dan column :

    Code:

    CREATE TABLE IF NOT EXISTS `files` (
      `id` int(4) NOT NULL auto_increment,
      `file_name` varchar(65) NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;


    INSERT INTO `files` (`id`, `file_name`) VALUES
    (1, '123');

    cixent
    Ahli Baharu
    Ahli Baharu

    Gender : Male Number of posts : 44
    Age : 27
    Location : Tumpat, Kelantan
    Job/hobbies : Jobless
    Registration date : 08/04/2009

    Re: PHP expert

    Post by cixent on Sat Apr 11, 2009 10:59 pm

    Boleh x bagitau aku pengguna Header?
    detail... ples.. Surprised

    Sponsored content

    Re: PHP expert

    Post by Sponsored content Today at 2:05 pm


      Current date/time is Sun Dec 11, 2016 2:05 pm