parsing php files

parsing php files

by joao santos -
Number of replies: 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
Average of ratings: -
In reply to joao santos

Re: parsing php files

by Eric Merrill -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of 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.
In reply to Eric Merrill

Re: parsing php files

by joao santos -
i'm uploading it in moodle sad

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 smile
In reply to joao santos

Re: parsing php files

by Eric Merrill -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of 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