/    Sign up×
Community /Pin to ProfileBookmark

PHP Command to…

Hi,

I need a PHP command/a command that I can put into a file, and run it with a cron job.

It needs to take the files in a certain directory(ies) and put them in a word document, in this format:-

Title of page here,/address/to/file/here.php

Thanks!

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJan 16.2012 — I usually use [url=http://php.net/glob]glob[/url]() for getting directory info into an array.
Copy linkTweet thisAlerts:
@leatesauthorJan 17.2012 — Could you please tell us/give us some example code that we can edit, so we can see how it works and use it.

Also, if we could also just make it list .html,.php,.htm,.aspx, etc. files, no .txt and stuff, and something so we can edit what file types too.

We are using it for a sitemap - the page, with php, gets the contents of the .txt file, and prints it in a certain way, so the user can then click on the page they want, and get taken there.

So we don't want other files that they don't need/aren't supposed to see being shown to them, like admin files, or just files that help the site run, like the sitemap file, robots.txt and .htaccess (and more)

Thanks!
Copy linkTweet thisAlerts:
@leatesauthorJan 20.2012 — Does anyone have any ideas?
×

Success!

Help @leates spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...