How to find the files in different folders by using php? -


this question has answer here:

i have question regarding php file structure.

i want run script genearte images of bunch of pdf files.

my problem pdf files in different folders , structures.

for example:

a pdf locate in

/test/book/pdf/test.pdf. 

another 1 in

/server/pdfs/link/dummy.pdf. 

there thousands of pdfs file in file system , using imagick generate images pdfs.

i not sure how locate of pdf nor how specify file path in imagick constructor.

 $im = new imagick('file path pdf here');  //i don't know how specify file path here...  $im->setimageformat( "jpg" ); 

can gives me hint? much!

you go root folder , scan directories , subdirectories .pdf files , store them in array (php: scandir), array or string caracter-delimiter between each filename.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -