A section of PHP code results related issues

Source: Internet
Author: User
A section of PHP code results
PHP Code
  
  Filename:", $file,"
"; Listdir ($dir. " /". $file." /"); } else{if ($file! = ".") && $file! = "...") {echo $file. " "; $arr = Explode ("", $file); Print_r ($arr); $sql = "INSERT into pdfcontents (pdf_title) value (' {$arr} ')"; }}} closedir ($DH); }} return ($file);} Listdir ("c:/aeed/phpnow/htdocs/2003z/nz/");? >



Results:
Nz01.pdf Array ([0] = nz01.pdf) nz02.pdf Array ([0] = nz02.pdf) nz03.pdf Array ([0] = = nz03.pdf) nz04.pdf Array ([0] = nz04.pdf) nz05.pdf Array ([0] = nz05.pdf) nz06.pdf Array ([0] = nz06.pdf) nz07.pdf Array ( [0] = = nz07.pdf) nz08.pdf Array ([0] = nz08.pdf) nz09.pdf Array ([0] = nz09.pdf) nz10.pdf Array ([0] =&G T nz10.pdf) nz11.pdf Array ([0] = nz11.pdf) nz12.pdf Array ([0] = nz12.pdf) nz13.pdf Array ([0] = = nz13.pdf ) nz14.pdf Array ([0] = nz14.pdf) nz15.pdf Array ([0] = nz15.pdf) nz16.pdf Array ([0] = = nz16.pdf) nz17. PDF Array ([0] = nz17.pdf) nz18.pdf Array ([0] = nz18.pdf) nz19.pdf Array ([0] = = nz19.pdf) nz20.pdf Arra Y ([0] = nz20.pdf) nz21.pdf Array ([0] = nz21.pdf) nz22.pdf Array ([0] = nz22.pdf) nz23.pdf Array ([0] = = nz23.pdf) nz24.pdf Array ([0] = nz24.pdf) nz25.pdf Array ([0] = nz25.pdf) nz26.pdf Array ([0] = NZ 26.pdf) Nz27.pdf ARRAy ([0] = nz27.pdf) nz28.pdf Array ([0] = nz28.pdf) nz29.pdf Array ([0] = nz29.pdf) nz30.pdf Array ([0] = = nz30.pdf) nz31.pdf Array ([0] = nz31.pdf) nz32.pdf Array ([0] = nz32.pdf) nz33.pdf Array ([0] = n z33.pdf) nz34.pdf Array ([0] = nz34.pdf) nz35.pdf Array ([0] = nz35.pdf) nz36.pdf Array ([0] = = nz36.pdf ) nz37.pdf Array ([0] = nz37.pdf) nz38.pdf Array ([0] = nz38.pdf) nz39.pdf Array ([0] = = nz39.pdf) nz40.p DF Array ([0] = nz40.pdf) nz41.pdf Array ([0] = nz41.pdf) nz42.pdf Array ([0] = = nz42.pdf) nz43.pdf array ([0] = nz43.pdf) nz44.pdf Array ([0] = nz44.pdf) nz45.pdf Array ([0] = = nz45.pdf) nz46.pdf Array ([0] = > nz46.pdf) nz47.pdf Array ([0] = nz47.pdf) nz48.pdf Array ([0] = nz48.pdf) nz49.pdf Array ([0] = = NZ4 9.pdf) nz50.pdf Array ([0] = nz50.pdf) nz51.pdf Array ([0] = nz51.pdf) nz52.pdf Array ([0] = = nz52.pdf) Nz53.pdf Array ([0] =&GT nz53.pdf) nz54.pdf Array ([0] = nz54.pdf) nz55.pdf Array ([0] = nz55.pdf) nz56.pdf Array ([0] = = nz56.pdf ) nz57.pdf Array ([0] = nz57.pdf) nz58.pdf Array ([0] = nz58.pdf) nz59.pdf Array ([0] = = nz59.pdf) nz60. PDF Array ([0] = nz60.pdf)

I just want to put the file name in the directory into the database. I can't save it.

------Solution--------------------
Oh, look at the wrong eye.

$sql = "INSERT into pdfcontents (pdf_title) value (' {$arr} ')";

$arr is an array of explode, without doing so, what do you want to save?

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.