How to include .php file in .shtml using SSI

Hi,
I've just finished with my "Contact Us form" for my website and have some issues with running it. I have a .shtml file http://mydomain.com/contact-us.shtml in wich I'd like to include a contact us form file http://mydomain.com/includes/ContactUs.php. Now, having my web page "contact-us" as a *.shtml file with ContactUs.php file included, I can run the form but I can't send any emails.  If I would change contact-us.shtml in contact-us.php the form runs perfect but, I can't use other includes on that file as logo, header, footer etc. How could I include an .php file in a .shtml file and runing both the included .php script and includes themself?
Thank You!

Keep it simple.
Your html file uses syntax like "<!--#include file=".header" -->" to include an SSI file. Your server requires either (1) that the html file have the .shtml extension or (2) you twiddle with an .htaccess file to cause the server to parse ALL html files for SSIs. The latter is generally not a good idea.
PHP files are already processed on the server. You include SSI files the same way, but the syntax is a little different: "<?php include (".header"); ?> ".

Similar Messages

  • How to load csv file to table using ssis

    Hi,
    i have loaded the csv file to table using ssis, it is working file but record is mismatch.
    source data :
    col1 col2 col3 col4
    aa, bb, this is sample,data for the details, this is 
    column delimiter - comma
    col3 - record contains comma. so col3 record after the comma is added with the as col4
    i need the col3 record with comma.
    so what is the column delimiter will use ?
    Regards,
    abdul Khadir

    Hi Abdul,
    Based on your description, you want to distinguish a comma is used for column separator or used in address column in a text file, then load the data from the text file to SQL Server table.
    As per my understanding, if you can replace the comma column separator to another delimiter like semicolon (;), just do it. Then we can select Semicolon {;} as Column delimiter for the Flat File Connection Manager. Or ensure all columns are enclosed in double
    quotes ("). Then we can set the double quotes (") as Text qualifier for the Flat File Connection Manager, and the commas will be loaded as part of the string fields.
    If you can't have that done, because computers don't know the context of the data, you would have to come up with some kind of rules that decides when a comma represents a delimiter, and when it is just part of the text. I think a custom script component
    would be necessary to pre-process the data, identify where a comma is part of an address, and then treat that as one field.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • How to include Php Files in SrcView and Release Build

    Dumb question
    For a long time I have been manually copying any changes to my php files from the debug to the release folder manually. I know they can be linked so they do so on compile (and I am hoping also included in srcview) but never took the time to figure out what the proceedure is.
    About time I guess Suggestions?

    What I have been doing is creating a new folder in your src maybe like "scripts" or something.  Then you can create a .php file in there and when you double click to open it should open your default .php editor.  Now when you do a release build it will include the folder "scripts" in your bin-release.
    Then do something like
    <s:HTTPService id="my_http_service" url="./scripts/script.php" result="my_http_service_resultHandler(event)" resultFormat="e4x">
    The only problem I have run into is when testing locally you will need to have a copy on a server, unless you have apache running locally.
    Hope this helps!

  • How to include external files in JSP

    hi,
    How to include external files like image or javascript in to jsp pages.
    I am using MVC frame work. So i have to use request dispatcher. While calling the pages trough dispatcher the external files are missing from the output. Also am using tomcat as server,web.xml(deployment descriptor ) is also configured.
    regards
    sree

    When you use the request dispatcher, the relative path for all your ressources becomes the relative path of your calling serlvet and not the JSP/servlet that you call. Make sure to use the full relative path such as:
    /PATH_TO_YOUR_DIRECTORY/myRessource.ext
    NOT
    SOME_DIRECTORY/myRessource.ext
    Jeff

  • How to include the file name as an XML field

    Hi,
    I'm using a file adapter for process a flat file and convert it into an XML. Does anybody knows how to include the file name into an XML field.
    Ex.
    I process the file named <b>XXIMN21022007.txt</b> and I need an XML like:
    <MT_FILE>
    <field1></field1>
    <field2></field2>
    <field3></field3>
    <filename><b>XXIMN21022007.txt</b></filename>
    </MT_FILE>
    Regards
    Gonzalo

    Just go for dynamic configuration.
    Check the sender file adapter to write the filename in the header (as explained in Michal's blog) and then read that header in some mapping.
    U can use that even in simple message mappings.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    Your code for the filename tag would be something like:
    <i>DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    return conf.get(key);</i>
    Regards,
    Henrique.

  • How to include .js file into validater-rules.xml

    iam doing project using struts.
    i have .js file for client side validation.how to include .js file into struts validate-rules.xml so that i can use those validation in my project.
    without writing any class.
    is there any way

    copy + paste from my book...............
    Enabling Client-Side Validations
    In addition to providing a framework for simplifying server-side form data validations, Validator provides an easy-to-use mechanism for performing client-side validations. Each validation routine defined in the validator-rules.xml file optionally specifies JavaScript code that can be run in the browser (client side) to perform the same validations that take place on the server side. When run on the client side, the validations will not allow the form to be submitted until they have all passed.
    To enable client-side validation, you have to place the HTML Tag Library's javascript tag in each JSP for which you want validation performed, as shown here:
    <html:javascript formName="logonForm"/>
    The javascript tag requires that you use the formName attribute to specify the name of a <form> definition from the validation.xml file, as shown here, for which you want validations performed:
    <form name="logonForm">
    <field property="username" depends="required">
    <arg0 key="prompt.username"/>
    </field>
    <field property="password" depends="required">
    <arg0 key="prompt.password"/>
    </field>
    </form>
    All the validations that you have specified for the <form> definition to run on the server side will be run on the client side.

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • How to include .jar files in coldfusion code 

    To Integrate our cfm code with paypal jar files we do the
    following steps with our local coldfusion server ,and to run and
    integrate the paypal Java SDK jar files, I think we need to do the
    same process on the server, can you suggest any thing to do the
    following setting for my domain on the server, without setting the
    class path in coldfusion administrator.
    The ColdFusion application server must be configured to know
    the location of the PayPal JAR
    files, and your ColdFusion Markup (CFM) pages must be
    configured with the absolute path to
    the PayPal API certificate for the PayPal API user on whose
    behalf the calls are made.
    1. Install the PayPal Java SDK “Installing the
    SDK”.
    2. Copy a subset of the Java SDK JAR files to a location
    accessible by the ColdFusion
    application server. The JAR files are in SDK_root\lib and
    their exact names are as
    follows:
    – bcmail-jdk14-128.jar
    – bcprov-jdk14-128.jar
    – paypal_base.jar
    – paypal_stubs.jar
    sax2.jar
    – xerces.jar
    – xpp3-1.1.3.4d_b4_min.jar
    – xstream.jar-1.1.3.jar
    3. With the ColdFusion Application Server Administrator, add
    the absolute path of the
    location you determined in Step 2 to the Java and JVM
    CLASSPATH environment variable.
    4. Restart the ColdFusion Application Server.
    Suggest me how to include .jar files without setting
    classpath.

    > Suggest me how to include .jar files without setting
    classpath.
    Copy them to {CF_HOME}\lib, where {CF_HOME} is, for example,
    C:\CFusionMX7. Restart Coldfusion.

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • How to extract .sit files(in MAC)  using java program

    Hi,
    please help me , i want to simple program for
    " how to extract .sit files(in MAC) using java program"
    that sit files same as zip files in windows..[                                                                                                                                                                                                                                                                                                                                   

    Thanks for reply...
    but i search in the google about this topic...there is no results will appear..
    the problem is "i have to run program in the MacOS like extract all the
    .sit(StuffIt) extension files. These sit files same as zip files in the windows... we have one tool called StuffIt Expander but it is 3rd party tool. but here requirement is i have to write my own program to extract all the files same as zip file program...
    please do the needful..i am waiting for ur reply,,,

  • How to transfer pc file to Samsung using the adobe reader app?

    how to transfer pc file to Samsung using the adobe reader app?

    I solved the problem.  I manually created my own Adobe PDF folder by connecting the phone via usb to my PC, Windows Autoplay gave me the option to 'Open device to view files'. Explorer then displayed all the folders on the phone.  I created an Adobe PDF folder manually and copied the PDFs I wanted to view into that folder.  Adobe Reader then found the files without a problem.  I clearly was missing something quite simple but something I'm sure a lot of people would miss.  Perhaps if the next version of Adobe Reader for Android created this folder automatically, like Kindle and Kobo and other readers do, it might save a lot of people a bit of a headache.

  • How to include .java file in all projects?

    Hi Friends, i have some questions related....
    1) i have a file .java with some great functions, this functions i need use in all projects, then what is the easy by moment i start a project, and copy this file to project..
      is possible have only 1 file with these utilities functions? (if yes how to declare or use in all projects?)
    Note these utilkities file i want use on JAVA desktop(swinf and javafx), on JSP webpages and in the futhurer on the mobile.
    2) i have a JSP project in 1 .JSP file i have 8 Tabs (CSS tabs) when user click on tab1 i execute some jsp java code. and if user click on tab2 i execute a different JSP code, but my problem is, the JSP file is large large large, 1500 lines, my question is: is possible (similar in PHP) do an include?
    <%
       include tab1.jsp
    %>
    thanks

    jamiguel77 wrote:
          1) i have a file .java with some great functions,
    If that is one Java file only I really doubt that those functions are "great" from a technical point of view...
    this functions i need use in all projects, then what is the easy by moment i start a project, and copy this file to project..
      is possible have only 1 file with these utilities functions? (if yes how to declare or use in all projects?)
    Note these utilkities file i want use on JAVA desktop(swinf and javafx), on JSP webpages and in the futhurer on the mobile.
    There is a  common approach to this problem which is a dependency repository. Various build tools address the dependency resolution problem. Most common are maven and greadle. Place your Jar file on a location you can reach from your various developement environments (eg. a share on a server in your network) Then configure your build tool to know about your repository.
    A better solution that a naked net share is a nexus server, which will not only hanlde dependencies you namually placed on your share but also dependencies available on public repositories.
    In your project you simply declare the (direct) dependencies of the Code you're writing. For maven you need an aditional file in your project: the pom.xml. maven (or greadle) will handle all the transient dependencies for you (as long as the pom.xml of the dependency also declares its own dependencies and those other dependencies are reachable for maven too).
    bye
    TPD

  • How to Include JS file already available in SharePoint Site(Style Library) in Command action

    I have included JS file in command Action Using below command 
     <CommandUIHandlers>
            <CommandUIHandler
              Command="EnableCustomGroup"
              CommandAction="javascript:return true;" />
            <CommandUIHandler
              Command="CustomGroupHelloWorld"
              CommandAction="javascript:openPopup();" />
          </CommandUIHandlers>
        </CommandUIExtension>
      </CustomAction>
      <CustomAction Id="Ribbon.Library.Actions.Scripts"
     Location ="ScriptLink"
     ScriptSrc="/_layouts/15/images/Scripts/Popup.js" /> 
    It was working fine now I am embeding my project to Development Project in which we have divided the Modules in to two different projects One project with all Branding work including all CSS and JS files (including the above Popup.JS file) which once deployed
    and the js file is residing in Style Library. 
    The Second project has the Command Action to call the JS file which is already residing in Site (Style Library) I am unable to refer that file path I tried using "/Style Library...... Popup.js" and also the full URL "http://site collection/style
    Library/... Popup.js" just to make sure if it is working or not. But it is throwing error saying file is not found. Can anyone help me how to refer the file what source URL should i give. Thanks in Advance
    Thanks and Regards,
    Raj Kamal Singh Rathore

    Hi,
    According to your description, my understanding is that you want to reference the custom JavaScript file which stored in the style library in custom action.
    I suggest you can reference the js file using the relative path of Style library like below:
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
    Title="test"
    ScriptSrc="~SiteCollection/Style Library/jquery-1.11.2.min.js"
    Location="ScriptLink"
    Sequence="100"
    >
    </CustomAction>
    More information:
    Referencing JS files using CustomAction element
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to include animation files into muse test site on business catalyst?

    Hi there
    I am trying to publish a site created in muse to the business catalyst test website service for a client to review
    in the website i created an animation that i have inserted as an HTML snippet (ie copied relevant code into "INSERT HTML"
    The question is how do include the folder with all the files required to run the animation when i click "PUBLISH" to business catalyst?
    thanks

    Hello,
    You can make the changes in .muse file and then publish it to the existing site.
    It will automatically detect your old site when you click on File>Publish ONLY if you are using the same Adobe Id to upload the site which you used earlier to upload.
    You can check which Adobe Id you are using by going into Edit>Preferences option and under Publish with Account youwill find the Adobe Id which is being used to upload the site.
    you can change the Id (if required) by clicking on the dropdown and click on Switch accounts.
    Hope this helps.
    Regards,
    Sachin

Maybe you are looking for

  • Apple id mess (alias as id $ @mac/@me problem)

    First of all I want to say that I have read almost everything about apple id, icloud, mobileme, etc. and that I know that I can not merge or delete accounts. Second, just point out that maybe my English is not clear enough so be patient. Thanks in ad

  • ITunes crashes every time I try to access the store

    Every time I try to access the iTunes store in the iTunes app it crashes. I am running Win 7 Home edition and the latest iTunes (I even uninstalled and reinstalled). Not only that but the albums that I purchased from the store only about 1/2 of the s

  • Need Standard Report

    Hi, Do we have a standard report which includes all the below fields. Pers.No.        Trip      Begins On Ends On      Reimbursmt      AccumM/Km      Vehicle Class i know that we have standard report S_AHR_61016401. But we dont have vehicle class in

  • I never heard about the Macbook recall for cracked casing along the bottom of the keyboard. Is it too late to get it fixed?

    I never heard about the Macbook recall for cracked casing along the bottom of the keyboard. Is it too late to get it fixed?

  • Entourage and iSync warning keeps appearing

    I have tried to set up my PowerBook to sync contacts between: 1/ Apple Address Book 2/ Entourage 3/ Nokia phone (through iSync) I have setup .Mac sync in System Preferences, and turned on contacts sync in Entourage. I have also added the phone to iSy