homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Sandbox conflicting included scripts

 3:40 am on Nov 6, 2012 (gmt 0)

I have a script that processes image uploads. To work it needs to include two scripts, one I write metadata to the images, and a second one allows me to upload the images to a CDN.

After much hair pulling I realized the two scripts work well, but not together.

Right now I had to divide my script in two. The first one modifies the images and saves it in a folder. Then the script passes a location header to load the second script to upload the images to the CDN. While it works it is not ideal.

I was hoping that there might be a way to isolate or sandbox the two includes so I can use them both on the same script.



 3:20 am on Nov 7, 2012 (gmt 0)

You might be able to wrap one or both in a class, and then create it as an object... or if it is simple, wrap it in a function.

Alternatively, find out what's conflicting in the first, and then unset / unregister it when you finish using it - before include()ing the second.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved