How to include CKeditor which is outside of your document root

 0  vote down  star
      

Hi,

Is it possible to use CKeditor which resides outside of your document root inside document root application?

For e.g. I am having directory structure like:

    My Documentroot

    C://xampp/htdocs/example.com

    My CKeditor is outside and parallel to document root say

    C://xampp/lib/ckeditor

How can I call ckeditor.js which is in C://xampp/lib/ckeditor/ckeditor in my application page, in C://xampp/htdocs/example.com/editor.php
teenashahAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shinesh PremrajanEngineering ManagerCommented:
yes you can,  however you need the lib folder to be within the htdocs folder. since htdocs is the folder which web server looks for.

so C://xampp/htdocs/lib/ckeditor/ckeditor will work for you instead of C://xampp/lib/ckeditor/ckeditor

Hope this helps
0
Daemon_ByteCommented:
If you are just doing it for ease of use when it comes to upgrading etc then you should be able to put all the files in one location and put virtual folders in each of the web folders linking to ckeditor. As long as the user can access ckeditor via the browser it doesn't matter where it's stored or how it's accessed. I have a subdomain set up for each website I create on the same server and then point them all to the same ckeditor location.
0
teenashahAuthor Commented:
Hi shinuq,

Thanks for prompt reply.

That means it not possible to access CKeditor functionality which resides outside of my htdocs, in this case its parallel to my htdocs directory.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

teenashahAuthor Commented:
Hi Daemon_Byte,

Yes your concern is right, for up-gradation and maintainability I want to keep these functionality in separate space so that many application can access it.

Can you give me detailed steps how I can achieve this "you should be able to put all the files in one location and put virtual folders in each of the web folders linking to ckeditor" ?
0
Daemon_ByteCommented:
If you are using windows xp you will have to use a subdomain because windows xp and earlier doesn't support folder short cuts. However in Vista and windows 7 you can create them.

ok so on one of those two machines you can do this in the command prompt (dos):

mklink /D C:\xampp\htdocs\example.com\ckeditor  C:\xampp\lib\ckeditor

Now restart apache. As far as your web server is concerned there is a folder at C:\xampp\htdocs\example.com\ckeditor that contains the files in the second folder but it is only a shortcut. So any changes to C:\xampp\lib\ckeditor will also change in C:\xampp\htdocs\example.com\ckeditor.  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
teenashahAuthor Commented:
Yes its working now
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.