parsing php files

parsing php files

gan 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
Cyfartaledd sgoriau: -
In reply to joao santos

Re: parsing php files

gan Eric Merrill -
Llun o Core developers Llun o Moodle HQ Llun o Peer reviewers Llun o Plugin developers Llun o 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

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

Re: parsing php files

gan Eric Merrill -
Llun o Core developers Llun o Moodle HQ Llun o Peer reviewers Llun o Plugin developers Llun o 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