Incorporating external php files into a scriptcase Blank application

I’m trying to incorporate a simple file manager application into scriptcase. It is a single php file (index.php attached) from https://github.com/jcampbell1/simple-file-manager.
If I copy the file into a folder of my apache server it works perfectly. If I copy and paste the source into a blank scriptcase application’s onExecute event,It doesn’t…

Is there a specific procedure to follow when adding custom php files that are not class libraries ?

[ATTACH=CONFIG]n72309[/ATTACH]

index.php.zip (7.36 KB)

filemanager.jpg

Are you trying to run this locally or do you upload the script case blank application to test?

Trying to run it locally , uploaded to test, same result

Cool Thanks, Will give it a bash and let you know

Hmm, I still cant get it to work , can you perhaps attach the code ?

Ok try this, remember to change the ?> and <?php tags about until the code looks good.

index.php.zip (8.27 KB)

Thanks Again :slight_smile: Is this exactly how you have it in the onExecute Event ?

The attached file is what i have in onExecute, still not working…

index.php (1).zip (8.06 KB)

ok try this first, rename index.php to something like testphp.php then upload to same area as the blank application in your server. then in on execute type this require_once(‘testphp.php’);

then run it

Which version of SC are you using ?

[SIZE=12px]version 8.1.051 this is my link to the working one [/SIZE]http://mescart.com/distr_skip_manager/system/blank_5/

Cool,:slight_smile: send me exactly what you have in the onExecute, maybe if I paste it in a new blank application it will work…

the code i sent before is the code used. with amended script

ok, But it is not exactly the code in onExecute. In the code that you sent, I removed <?php from the top and added <?php at the bottom
Which gives me:
[ATTACH=CONFIG]n72367[/ATTACH]

files.png

ok that is exactly what I have now, the one error. If I upload that to test it should work ?

Can only try

sorry there was some confusion, you got it working on your test server but not locally right ?

yes test server, I use a mac so difficult to use something locally like this.

Ok Even on my test server im getting a Javascript error : Uncaught SyntaxError: Unexpected token >

Thanks for the help anyway :slight_smile: