Folder creation and file upload with PHP?

Just a general question before I contact support (if I need to) with website specifics. Im trying to build a file uploader using PHP, which is built to create a subfolder (if the one it needs isnt there) as well as upload the files into the folder. I can create folders and drag-n-drop files using the file manager provided, but for some reason, I cant get a PHP version working. Does InfinityFree restrict the creation of folders or upload of files using PHP? I know about the filesize limits and the files I am uploading are far below that limit, but it seems I cant get PHP to create any folders either.

Are there any tips or restrictions about using PHP for this kind of thing?

Hi and welcome to the forum

You need to give us your code to see what happens,
but maybe it’s something like this

Getting the real error message

To help fix this, you’ll first want to enable error messages on your website. You can enable PHP error messages from the control panel:

Login to your control panel.
Go to Alter PHP Config.
Select the domain name you are trying to debug and click Alter PHP Directives.
Set “Display Errors” to “On” and click the Alter PHP Directives to save.

If you refresh the page, you should hopefully see an error message.

If don’t see an error message, this is likely caused by your script suppressing or capturing error messages from PHP.

The first thing to try is to see if your software has a debug mode option, log file or other setting which can be used to get the error message.

And one important thing is that this hosting is exclusively web hosting
and not file share and the like…
Please think carefully about what you’re doing because otherwise, it’s a TOS violation


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.