parsing php files

parsing php files

av joao santos -
Antall svar: 3
Hello
Im pretty new to moodle in particular and moodle development in particular.

im trying to upload a html which has php code,but the php code isn't parsed when i access the html file neither by creating a link to it in a web page resource,nor by just navigating through the course's file directory nor writing the url directly in the address bar.

any suggestions,comments?

many thks in advance
joao
Gjennomsnittlig vurdering: -
Som svar til joao santos

Re: parsing php files

av Eric Merrill -
Bilde av Core developers Bilde av Moodle HQ Bilde av Peer reviewers Bilde av Plugin developers Bilde av Testers
Are you uploading it in Moodle, or directly to the servers local file system (where the moodle 'system' files are)?

In the first case, uploaded files are not evaluated, this would be a significant security problem if they were.

In the second case, most webservers are setup to not parse PHP in html files.
Som svar til Eric Merrill

Re: parsing php files

av joao santos -
i'm uploading it in moodle trist

I want to add some features to moodle, namely i want teachers and/or students to upload files and then users have some manipulating options over those files.

Is it possible to do all this with some new php modules or do i have to develop a side aplication and then linking it (possible?) with moodle stuff (courses, resources, database, etc).

thks smiler
Som svar til joao santos

Re: parsing php files

av Eric Merrill -
Bilde av Core developers Bilde av Moodle HQ Bilde av Peer reviewers Bilde av Plugin developers Bilde av Testers
In order to add features to Moodle, you would have to do it in the Moodle source files.

Uploaded files are not evaluated, because it would allow users to do whatever they want to all the files in Moodle and the database (they could view or delete everything).

Also, Moodle has no way of editing uploaded files (that i know of), but Im not sure what exactly you are looking to do.

-eric