@dylanh724:
EDIT: Sorry wrong thread! Can someone move me to Development area? Thanks/sorry .. didn't realize there was a section~
Hi,
I'm pretty new to php until I started working with PFS. I find myself pretty good at editing, but as for making new files .. not so much:
#!/usr/local/bin/php -f
Is this above code required for all php files within PFS?
This means you can call the file in shell if you give it +x.
require("config.inc");
If I put this up top, this means I can use code from config.inc, right? Like imports from .NET?
YES you can call functions on that file.
I noticed that files are "included" very generally – like 'xx.inc' rather than '/etc/xx/xx.inc' .. does this mean there's a file I need to edit to include any new files for easy importing such as this?
pfSene uses PHP and exploits as much as possible its configuration settings.
The short way is used since a include path is setup for php where to find things.
Finally, can any of these files be called from captive portal files? Can a captiveportal-customupload.php call , say, config.inc?
Surely there is nothing preventing that since even the existing page does that.