Create a library of common code

I want to create a library of common PHP and JavaScript code. How can I do? The design problem that I have is how can I access this code in all of the different sites. Dreamweaver gave precedence to the common code, such as code to access a mysql database. I want to put in place a similar library for my code.

Thanks for your help.

That's good news, if all of the sites are on a server. If you can make changes above the web root, then you can use the method I described.

There are several ways to set the PHP include path. It can be done in PHP.ini, using set_include_path in your script, or simply by providing the path (can be relative) in the call to the file, like this:

include (.. /.. /.. / mylibrary/key.php);

Google "apache alias" to learn more about the use of this method. However, this requires the ability to edit the http.conf file, which you may not.

The alias method is good for sharing images and CSS in different sites, but I wouldn't use it for things such as database login scripts.

Tags: Dreamweaver

Similar Questions

  • Are there disadvantages to the use of libraries in the project to organize common code used by different projects?

    My company is trying to determine how best to organize and share our common code. We use subVersion. We have several important programs that are deployed on different machines, some of which are running older versions of labview. I read a lot of documents on how to share the code, but I still don't know if it makes sense to use the project libraries to organize the code which will be shared by several projects. Another option is the package build. Can someone comment on the advantages and disadvantages? Thank you.

    Because you use several versions of LabVIEW, go with the packages.

    The project libraries are stored in a specific version of LabVIEW.  So if someone registers in 2014, you can't use it in 2013.

    If you use packet, then you have a core library that is 'installed' for a specific version of LabVIEW.  Each version of LabVIEW can have its own installation of this package.

  • Create a library in Blackberry JDE

    Learn more and more :-)

    I want to create a library for a couple of functions.  I can what I have to specify 'Library' in the definitions of the project

    Several output files are created. To use the library, I guess I should do an import in the class where I want to use

    the functions. What file?

    Anything else I should do?

    Hi ingvar_e,

    What do you mean by import all projects does not work?

    If you have a common project, the classes you want to reuse in 3 different projects, then to make joint project as project of library is the best solution, I know. What confuses you with this concept.

    If you have a JAR file, then take a look at this article to compile library:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Compi...

  • How can I create a library item in the latest version of dreamweaver CC?

    How can I create a library item in the latest version of dreamweaver CC? I want to save my Start menu and my right foot of author as part of the library but can not find a way to do it.

    Switch to the design view or Code view, and drag the selection to the active panel library category.

  • Create/class library with graphics drawn in flash

    Hello

    I'm new to the forum and I use flash for a short time...


    I would like to create a library that contains the objects designed in flash and classes that manage.

    An example: the use of flash I want to create a user profile box. This box contains a circle (profile picture) and a label (username).

    After that I would create an ActionScript class to insert the image in the circle and the name on the label. In the end, I have a class that manages user profile area.

    After I would use this class in another flash project.

    I hope that I was clear...

    How can I do?


    Thanks to all those who wish to respond.

    Create a new movieclip and draw your graphic elements on the stage of this movieclip.  assign to each object you want to control with actionscript, an instance name.

    assign this movieclip a class (for example, by double clicking in the column link from the library panel adjacent to the movieclip symbol).  Right-click as movieclip and click on Edit class.  create the code required by your class.

    You can use this movieclip and class to any other project pro flash by dragging the movieclip symbol in the library of the other project and moving the class file to the new project class path.

  • Get the ID of a dynamically created symbol library, inside another symbol.

    Hello world

    I'm trying to get the id of a dynamic created symbol library.

    When you dynamically create the symbol directly on the stage (or the level of the composition), there is no problem.

    But I can not function when you create the symbol inside another symbol.

    A few examples using 'getChildSymbols()' and 'aSymbolInstances '.

    // USING "getChildSymbols()" /////////////////////////////////////////////////////////////////////////

    ON THE STAGE

    var m_item = sym.createChildSymbol ("m_item", "Stage");

    var symbolChildren = sym.getChildSymbols ();

    console.log (symbolChildren [0] .getSymbolElement () .attr ('id')); / / ok eid_1391853893203

    / / Inside a SYMBOL OTHER

    var m_item = sym.createChildSymbol ("m_item", sym.getSymbol("holder").getSymbolElement ());

    var symbolChildren = sym.getSymbol("holder").getChildSymbols (); / / I use this maybe wrong?

    console.log (symbolChildren.Length) / / returns 0 if can't ID is

    ' USE 'aSymbolInstances "".

    ON THE STAGE

    var m_item = sym.createChildSymbol ("m_item", "Stage");

    console.log(sym.aSymbolInstances[0]); / / ok (I guess) x.fn.x.init [1] 0: #eid_1391854141436 div

    / / Inside a SYMBOL OTHER

    var m_item = sym.createChildSymbol ("m_item", sym.getSymbol("holder").getSymbolElement ());

    console.log (sym.getSymbol("holder").aSymbolInstances [0]); / / Error Javascript in the event handler. Type of event = element

    In this post http://forums.Adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you a table containing all the 'names' when you create symbols"

    Would be - this only works on the scene / composition level only and not inside a symbol?

    The following methods to obtain the same are indeed possible, but I do not simply want to use them in this case:

    (1) storing a reference to the symbol created in a table and call it later by index.

    (2) giving the elements an ID manually on the creation and use of document.getElementById () thereafter.

    I can't believe that this is not possible. I am probably missing something here.

    Forgive me that I am a newbie using Adobe Edge!
    I really hope that someone can help me here.

    Anyway, thnx in advance people!

    Kind regards

    Lester.

    OK, I solved my problem by using the (simple) code below.
    I guess that 'getChildSymbols()' and 'aSymbolInstances' only works on stage / level of the composition.

    Just thought I'd share this to everyone. Peace!

    var m_item = sym.createChildSymbol ("m_item", sym.getSymbol("holder").getSymbolElement ());

    $.each (sym.$("holder").children (), function (index, obj) {}

    Console.log ($(sym.$("holder").) ([Index] Children()) .attr ('id'));

    });

  • playlists iTunes 12 lost when creating new library in Windows 10

    I'm working with two iTunes 12 libraries in Windows 10. One is mine, the other, I want to create, is my wife. When I try to build his library and return to mine, I lose my original library reading lists, so I keep having to restore my library.xml file. I think I follow the instructions carefully on the creation and by selecting a library, but I'm apparently something wrong. DETAILED instructions are available on how to create and switch between libraries both iTunes and two sets of playlists?

    Hello artm124,

    Create a new, discreet iTunes Library need only open iTunes with the SHIFT key, and clicking 'create the library... '. "When you are prompted. Once you have created a new library, you can switch back to your library (complete with playlists and other metadata) to leave iTunes and once again open it with the SHIFT key.

    Windows

    1. If iTunes is running, quit iTunes.
    2. Hold down the SHIFT key. Then, in the start menu, choose all programs > iTunes > iTunes.
    3. You will see a message that says choose iTunes library. Depending on what you want to do, choose library to choose or create.

    If you do not see the message, try again. Remember to hold down the Option key if you use a Mac or the SHIFT key if you are using Windows.

    Open a different iTunes library file or create a
    https://support.Apple.com/en-us/HT201596

    If you are concerned about the potential loss of your playlists and other metadata stored by iTunes, make sure you have a backup of the iTunes Library.itl file which is inside your iTunes Library (which can be as simple as the copy of the file on the desktop).

    The iTunes Library.itl file is a database of songs in your library and playlists that you created. Some specific song data is saved in this file.

    On the iTunes library files
    https://support.Apple.com/en-us/HT201610

    Please note that if your iTunes content is stored in your iTunes library, it can help to make sure everything is where it should be. The article below the link provides a wealth of information to check and touching your iTunes library is there and it should be shaped.

    Search and organize your iTunes media files
    https://support.Apple.com/en-us/HT204668

    I hope this helps!

  • What happens when the photo of system library is on an external drive and then the system creates a library of Photos? How do merge you them?

    What happens when the photo of system library is on an external drive and then the system creates a library of Photos? How do merge you them?

    Your library system can be on an external drive, if the drive is Mac OS extended (journaled) format and mounted on-site.

    But you must be careful, your external drive is always connected and available before the Photos and to import new photos.

    If Photos opens a different library, news, you can switch to the library on your external drive by double clicking on an external library. You can have several libraries, no problem.

    But pictures don't have any tools to merge libraries. You can switch between libraries, then open them alternately.  To merge two libraries export the photos of the smallest library and import the photos exported in the largest library.

    Or use third-party "PowerPhotos" to move photos between libraries.  But the merger is not supported in the free trial version. You must purchase the full version. You can download it here: Fat Cat Software

  • Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared //com.sunopsis.tools.core.exception.SnpsSimpleMessageExcepti

    Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared.

    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: error in the interpretation of the task.

    Task: 1

    java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:489)

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:737)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:476)

    ... 11 more

    Caused by: org.apache.bsf.BSFException: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at bsh.util.BeanShellBSFEngine.eval (unknown Source)

    at bsh.util.BeanShellBSFEngine.exec (unknown Source)

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:471)

    ... 11 more

    Text: REMOVE OF <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? >.

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:764)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    If you do this in a procedure, use the following syntax:

    <%=odiRef.getObjectName("L", "TRG_SALES", "D")%>

    and set the relevant logical schema in the options on the target tab of the procedure. Also, make sure you only select the correct technology type in the options on the target tab.

  • How to create programably InputComoboxListOfValues in java code

    12.1.3 jdev

    I'm trying to dynamically create InputComoboxListOfValues in the java code as follows.

    RiLOV RichInputComboboxListOfValues = new RichInputComboboxListOfValues();
    riLOV.setLabel (label);
    riLOV.setId ("iclov" + ind);
    riLOV.setVisible (true);
    riLOV.setRendered (true);
    riLOV.setSimple (true);
    riLOV.setContentStyle("text-transform:uppercase;");
    riLOV.setValue (defaultValue);
    riLOV.setPopupTitle ("search dialog box");
    riLOV.setAutoSubmit (true);

    I also need to

    riLOV.addLaunchPopupListener (myLaunchPopupListener);

    riLOV.addReturnPopupListener (myReturnPopupListener);

    My question is how to build myLaunchPopupListener /myReturnPopupListener

    Thank you.

    riLOV.addLaunchPopupListener (myLaunchPopupListener);

    riLOV.addReturnPopupListener (myReturnPopupListener);

    Instead of addX() methods, you can use the setX() methods that use the MethodExpression as parameter.

    Example for MethodExpression: Blog in Java Evangelist John Yeary: JSF 2.x tip of the day: creation by programming MethodExpression EL

    But, af:inputListOfValues / af:inputComboboxListOfValues components require a very complex model to activate filtering etc so this can be very difficult to implement correctly if they are not supported by the link layer.

    From here you can download components done face ADF demo and see how this can be implemented: Application Development Framework downloads

    BTW,

    riLOV.setContentStyle("text-transform:uppercase;");

    Of course, you know that this only display value in uppercase on your page and does not convert the value in the data model?

    Dario

  • I'm going to erase my media Cache files before you start a new project, but when I go to/Library/Applications/Common/there is no media Cache folder. I have never had this problem before and am 10.9.5 OS and using clues CS6?

    I'm going to erase my media Cache files before you start a new project, but when I go to/Library/Applications/Common/there is no media Cache folder. I have never had this problem before and am 10.9.5 OS and using clues CS6?

    Hi Dave,.

    The location is ~/Library/Application Support/Adobe/Common to be exact.

    Make sure that you type the TILDE (~) key.

    When in the Finder, click the go > go to folder... > Type ~/Library and navigate to Application Support/Adobe/Common

    Thank you

    Regalo

  • "After effects WARNING: cannot create file library/preferences/Adobe/After Effects/13.2/dummy. ???

    The error message I recibed. Please help me

    After effects WARNING: cannot create file library/preferences/Adobe/After Effects/13.2/dummy

    fix the permissions problem that prevents starting applications Adobe | After the effects of interest area

  • Creating a library of VM images running on different PC

    I am relatively new on the VM technology and would appreciate some advice on the following query.

    We want to create a library of virtual machines (Windows o\s) and store it on a network server. It would be managed by anyone in society playing the virtual machine on their local machine (via the reader of the VM). The library of VMs will be most likely created using a computer dell laptop, but the images may need to be played on desktop dell and other manufacturers of desktop computers / cell phones, e.g. toshiba etc.

    My question is the virtual machines would go well in this environment? is there a possible problem with drivers?

    MAZ

    as long as you have not RedHat VMs or similar that involve special cores depending on the host CPU... it will work

    ___________________________________

    VMX-settings- VMware-liveCD - VM-infirmary

  • It is a new connection created when I run this code?

    Hello everyone,

    Anyone know tell me if a new connection with the database, it is created when I run this code?

    I use JDeveloper Studio 11.1.1.4.0.

    ADF Swing application.

      //Método que exclui os endereços filhos de Observador
      private static void excluirEnderecoObservadorPanelGrid(Row row) {
          String appModule = "hidro2.gov.snirh.ig.hidro.model.adf.app.AppModuleGlobalTabApoio";
          String config = "AppModuleGlobalTabApoioLocal";
          ApplicationModule am = Configuration.createRootApplicationModule(appModule, config);
          ViewObject voObtemEnderecoObservador = am.findViewObject("ViewObjEndObservador1");
          
          try {          
            
              voObtemEnderecoObservador.setNamedWhereClauseParam("END_OBS_ID", row.getAttribute("ObsId"));
              voObtemEnderecoObservador.executeQuery();
              
              if (voObtemEnderecoObservador.getRowCount() > 0) {
                 Row rowEndereco = voObtemEnderecoObservador.first();
                 rowEndereco.remove();
                 am.getTransaction().commit();
              }
      
          } catch (Exception ex) {
              ex.printStackTrace();        
          }
    }

    Hello

    You must free request module after the creation.

    ApplicationModule m = Configuration.createRootApplicationModule (appModule, config);

    In the finally block, add the code below

    Configuration.releaseRootApplicationModuleHandle (appModule, true);

  • Complete mapping and the library of labview code order

    I worked with a Schneider Electric M258 Logic Controller (PLC). I already used an Ethernet cable to connect, recognized as a device of TCP/IP network OR max. Recently, I used a Schneider Electric TSX C 485 USB cable to connect via a COMPOTE. This connection is also recognized in NI MAX, as well as the fact that I can actually open a panel of test VISA this way.

    I'm looking for help step by step how to use LabVIEW to scan the logical controller for the command codes, it is used to control other instruments (heaters, pistons, etc.), can fill a library in a project, LabVIEW myself with these commands, so that I'll be able to control these instruments from my laptop.

    Hello

    Unfortunately, there are currently no tools or methods for the analysis of the controllers for control with LabVIEW codes. For a list of commands using the PLC, I reference the manual for the device or contact the manufacturer.

    Many instruments are prefabricated screw to control these instruments available on the NI Instrument Driver Network (www.ni.com/idnet) that were created by the manufacturers or other users. I searched for the Schneider Electric M258 Logic Controller (PLC), but sees not all drivers. If you are interested in a person having to create these screw driver for you, we have the Alliance partners who can help you with that. (http://www.ni.com/alliance/)

    Once find you the commands from the manual or the manufacturer, you can develop your own screw driver for the device and, if you feel so inclined, download them to idnet. Information on the creation of instrument drivers for devices to use in LabVIEW in the following link.

    https://www.NI.com/DevZone/IDnet/development.htm

    Good luck with your instrument driver development!

    -Eric

Maybe you are looking for

  • Install El Capitan 10.6.8?

    I have a late 2008 MacBook Pro (4.1) running 10.6.8 and I'm trying to see how far I can upgrade the operating system. Supposedly, I should be able to update to El Capitan, but in the Mac App Store nothing happens when I click on "enter" to El Capitan

  • Need advice on upgrading and configuration of the OS on Tecra A6

    HelloI just bought a tecra A6 from ebay and it runs pretty slow so I want to upgrade a little. First of all he has windows 7 installed, so I think re-install to windows xp professional. Anyone know if I will find all drivers take charge, or what it w

  • Intel HD need display driver for my Satellite A660

    I recently tried to use Windows Movie Maker, but get error message to say installed the driver Intel HD is blocked. (version 8.15.10.2014). When I try and update through the update Intel tells me can not be updated as manufacturer of operation has se

  • Update iOS 9.2.1 broken car sync

    Afree than the latest iOS update (9.2.1), my iPhone than plus 6 no longer works with my car. I have a Toyota Corolla S 2015 and until this latest iOS update, when I plugged into the USB port on the dashboard, I could navigate the menus, see album art

  • Publish with the installation of Windows updates.

    do a clean reinstall of windows xp. Im running a Dell Dimension 2400 with a Celeron CPU 2 .4GHz and 1.99 GB of ram that I loaded sp3 and net framework 3.5, I could update twice that the update said I had about 130 updates but it installed only about