Conversion of an include before including file name

Hello

I have several include files with the .shtml extension in the file name. The .shtml files, however, containing simple html. I need to use the file extension shtml due to a requirement of my host. Long story.

In any case, I use the following entry to include it in my news.php file: <? PHP include ('franchise_header.shtml');? >

When the news.php file is uploaded to the server and treaty, php treats him * *.shtml file and wants to treat it as an SSI file. Once that happens, I get errors. What I have to do is to get php to display the file as 'franchise_header.txt '. Once includes have the extension .txt file everything works fine since php see the extension txt and plunges the html code of the region, I need no further processing. But I don't want to physically change the names of files on understands it.

Question: Is there a way, through php, take the .shtml file extension and convert .txt dynamically, and then execute the include command after that?

Thank you!!! I couldn't find information through web search.

Includes server-side require at least two files.

1. the parent file - one who calls understand it.
2. the include file - one being included.

The parent file MUST be named with the extension that triggers a server
parse. If include it is an ordinary HTML inclusion, this extension may be
* .shtm (l), or * .asp, or if your host has enabled the analysis for all server
file extensions, so it is not matter what you name.

The include file has no restrictions of designation - you could name it
'foo.monkeybutt' If you wanted, and it would continue to operate.

Now that we have that out of the way, does this mean that your host wants
you name the file with this extension include?

> I need to use the shtml
> due to a requirement of my host file extension.

If so, the host is a jerk. Otherwise, I'm sure you've misinterpreted
requirements of the host.

--
Murray - ICQ 71997575
Adobe Community Expert
(If you * MUST * write me, don't don't LAUGH when you do!)
==================
http://www.dreamweavermx-templates.com - template Triage!
http://www.projectseven.com/go - DW FAQs, tutorials & resources
http://www.dwfaq.com - DW FAQs, tutorials & resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"proxyfilter" wrote in message
News:f96lif$g3t$1@forums. Macromedia.com...
> Hi,.
>
> I have several include files with the .shtml extension in the
> filename.
> The .shtml files, however, containing simple html. I need to use the
> shtml
> due to a requirement of my host file extension. Long story.
>
> In any case, I use the following entry to include it in my news.php file:
><>
> include ('franchise_header.shtml');? >
>
> When the news.php file is uploaded to the server and treaty, php treats
> the
> * *.shtml file and wants to treat it as an SSI file. Once this happens,
> I get
> errors. What I have to do is to get php to display the file as
> 'franchise_header.txt '. It includes the .txt file extension
> everything works fine since php see the txt extension and removes html code
> in
> the area I need without further processing. But I don't want
> physically
> change the names of files on understands it.
>
> * Question: is it possible, through php, take the .shtml file
> extension
> and convert .txt dynamically, and then run the include command
> who?
>
> Thank you! I couldn't find information through web search.
>

Tags: Dreamweaver

Similar Questions

  • The file names changed in wingdings, including the file extension and I can't delete, change them, open, etc. Here are the pictures.

    Have (had) a file with multiple files it contains with pictures in each file.  A week ago the pictures were there.  Now, the names are replaced by wingdings as names and file extensions.  When I try to open it, it is not accessible and that the file name, directory name or volume label syntax is incorrect.  When I try to delete it, it says that the file name you specified is invalid or too long and specify a different name.  When I try to rename it, it tells me that if I change the file name extension, the file may become unusable.  If I try to change anyway, it says I've specified file name is not valid or too long.  Only tried for the name 1.  I did a restore in the case where a program interfered with that.  However, nothing has changed.  All of the suggestions.

    You can download and try to delete the file Unlocker http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtmlwilh.  Although it is not designed for this particular circumstance, it may very well work in all cases, as it has been very successful in a wide variety of situations are not specifically highlighted in the directions (where do not work the normal Vista options).  NOTE: Some antivirus flag programs this program as a malware, but it is a 'false positive' and is safe to use perferctly.  My own software to flag, but several other well-known software products it clean and the warning is included in the documentation of the program.

    I wish there was a way to save the images, but at this point, it seems that the only option is to delete because you can't rename files EHF (if this option is available-I hope that work above).  Unfortunately, System Restore does not affect the files of data, so even if a program caused this, System Restore can eliminate the cause, but it would not restore the files to their previous names.

    If you have Vista Business, Vista Ultimate or Vista Enterprise, you can be lucky because they retain the files called snapshots http://windows.microsoft.com/en-AU/windows-vista/Previous-versions-of-files-frequently-asked-questions.  It can be used to recover previous versions of files that have been changed or deleted accidentally.  Here's how: http://www.microsoft.com/windows/windows-vista/features/shadow-copy.aspx.

    If you have Vista Basic or Premium of Vista, you don't have a shadow, but there is a free program for you that does essentially the same thing called Shadow Explorer: http://www.shadowexplorer.com/.  I suggest that you download and implement as soon as POSSIBLE to protect you if you accidentally delete or modify a file.  It will not help you in this instance, but it can help save the next time.

    I'm more concerned about why this has happened in the first place and prevent it from happening again.  I saw file names change before, but never of wingdings which then do not let you open, edit, delete, or rename.  We will check some of your system files: go to start / all programs / accessories / command prompt and right click on command prompt, and then click Run as administrator.

    Type sfc/scannow, go and let it run.  It will scan and try to correct some of your system files.  If all goes well he comes complete with no corruption, it could not repair (if it has these post of corruption here or try to analyze it to find the problem or files using http://support.microsoft.com/kb/928228.  If you find any these corrupted files, try to post them here.  Maybe we can replace the good files on the disc.

    While in the command prompt, type chkdsk /f /r and enter and let it run.  It will scan and try to solve any corruption or bad sectors on your hard drive and remove especially as a cause.

    If this does not work, then please post repetitive errors in Event Viewer about the name change (Start / Control Panel / administrative tools / Event Viewer).  Here's how to use Event Viewer: http://www.bleepingcomputer.com/forums/topic40108.html.

    If this does not work, you will need to do a repair/system upgrade using the Windows Vista Installation disc authentic (you own or that you can borrow from someone).  Here is the procedure: http://www.vistax64.com/tutorials/88236-repair-install-vista.html as well as the upgrade from an earlier version of the Windows section of the following: http://support.microsoft.com/kb/918884.  Although this will not affect your data, settings or programs, you should always back up your data before you start just be on the safe side. If other procedures do not work, it is almost certain to work - but it will probably not fix your renamed files.  You can have a lot of updates to re - install (including all you need to remove service packs).  If the version on system with SP1 or SP2 preinstalled cane and the disc is an earlier version, then you will need to do a slipstream drive as follows: http://www.vistax64.com/tutorials/151606-vista-sp1-slipstream-installation-dvd.html.

    I hope one of these procedures can solve your problem.  If this isn't the case, after return and we will try something else.  Return message anyway so we know how it turns out.

    Good luck!

    Lorien - a - MCSE/MCSA/network + / A +.

  • File name includes one or more invalid characters.

    'File name includes one or more invalid characters.

    Looks like maybe a bug if the photos are not taken with the cam of the Atrix.

    FYI - https://supportforums.motorola.com/message/352799#352799

  • Cannot copy file names that include the slashes, commas, etc.

    Hello.

    I am trying to copy files from my old Mac G5 tower (about 10 years).  But my copy fails with an error message when trying to copy a file name that includes a special character.  Is there a way to get around this?

    To clarify: when it runs in a file with special characters, it gives me the error message that the file name is too long or contains special characters.  The problem is that when I click 'OK' to confirm the error (not), the copy is aborted.

    Any ideas?

    Thank you!

    E. -.

    Oh!  Well I guess you will have to wait for someone with a Mac experience for you then help.  I do not have one.  I'm sorry.

    BTW, you should post your question on Apple/Mac forum.  Many experienced people who can help you.   Good luck.  :-)

  • How I save action to save as that does not include a file name?

    HI -.

    I have an Action that will be cropping and scaling a PDF file then save it as a JPG in a destination folder.  The problem is that when I recorded the Action I did with a file named ABC. PDF and saved as ABC. JPG - and now all files saved with this

    Action is called ABC. JPG

    It is therefore impossible to use with a bunch of different files.  A file gets overwritten several times with the same name.  The ABC's of file name. JPG is 'burned' in Action.

    -How to record an action to save money without including a file name?

    Your help on this crazy problem TIA-

    Josh

    CS5 on Windows7

    Have you looked at file > Scripts > Image Processor?

    This could be all you need to batch convert a folder of files to JPEG.

    Nancy O.

  • DW creates files that include-1, -2, -3, in file name?

    Hello

    I hope this is the right forum for this question. For pages in the direction of the root of our Web site, files ending with .html unexpectedly now have several pages ending with - 1.html,-2.html, etc.. For example, a Web page that included the name gamepage.html now has 4 versions of this page:

    GamePage.html

    GamePage - 1.html

    GamePage - 2.html

    GamePage - 3.html

    It is a function of Dream Weaver (if so, please describe) or do I have to contact our ISP, to say that? Thank you.

    Do you remember how or why DW2 created (or allow you to create) files with these extensions, what was the purpose? For example, what was a way to create backup files so he could go back to an earlier version of a page if you wish?  Thanks for your patience!

    I never said that DW2 created these files.  As far as I know, VERSION No. DW never spontaneously created these files (but my history with DW goes back only to DW2).

  • How to change a 'Save as pdf script docs' to include the custom file name suffix

    I am trying to add some efficiencies of larger projects buy reducing the number of steps needed to export to PDF. I want to add a custom chain file name.

    YOU WANT

    From:

    20131006_KK_Brochure_v1.PDF

    TO:

    20131006_KK_Brochure_v1_OUTLINES_PRINT.PDF

    However, I have problems with the code that I modified. The code below is the addition of "_OUTLINES_PRINT" as a prefix, rather than as a suffix.

    function getTargetFile (docName, ext, destFolder) {}

    newName = "_OUTLINES_PRINT"; var

    If (docName.indexOf('.') < 0) {}

    newName = docName + ext;

    } else {}

    var point = docName.lastIndexOf('.');

    newName = docName.substring (0, dot);

    newName += ext;

    }

    Any help would be appreciated.

    Any help would be appreciated.

    change this line

    newName += docName.substring(0, dot);
    

    for this

    newName = docName.substring(0, dot)+newName;
    
  • Include the file name on the exported JPEG files

    Is possible to overlay a file name on an export jpeg?

    I create JPEG files for my site and wish I could auomaticaly overlay on the image, the file name. This will allow viewers to the site identify the image. I managed to overlay a watermark, but not the name of the file.

    I would like the image to look as it would in the slideshow module. Which allows a file name to be superimposed on the image.

    I use Lightroom 3 with Windows 7 64 bit.

    Any help would be greatly appreciated.

    Rob..................

    Rob,

    It has no function in LR to add overlays of text on the exported images. You can take a look at LR/Mogrify for this ability. I've not used myself, but know about its capabilities.

    Gossweiler beat

    Switzerland

  • NEITHER supplied include files copied to project files?

    I pulled out a project compiled and disseminated under a particular version of the CVI [8.1.x].

    Then some time later, another person retrieved the project for maintenance and has tried to compile it, they could not find the NOR include files.

    They come back to me!

    The reason why they could not compile the project was that they used the CVI 9.x.

    The project was looking for the include files in \Program Files\CVI81. Complaints went to the Manager.

    So, the question is a practical common.

    If the list of project files, point on the NOR prescribed [installed] folder locations.

    or if the necessary include files be copied manually in 'local' project folders before the release?

    Thank you

    Scott Youngren

    Northrop/Grumman electronic systems

    The short answer is no: OR the include files must remain in their repertoire; the IDE should solve all the paths by itself.

    To learn more:

    • #include directives must only list the names of files, not the path names
    • All basic guidelines OR files include must go in the support of style (for example #include )
    • Instruments include files should go in the style of the quotes (e.g., "inifile.h" #include)
    • Your include files may go to the source folder or other folders of your choice (see following)
    • Change project options to set 'Include path' (i.e. folders where the include files are searched): applied to all the draft instruments loaded like a library specific to the current project for application-specific include paths

    I always got my projects in accordance with these rules and never had a problem in the upgrade version of the IDE while developing. You will see that most of them is automatically defined by CVI (e.g. when the system asks you to include some files needed for some statement: it uses the correct style).

  • fatal error C1083: cannot open include file: 'NiVisaComponent.h': no such file or directory

    I found the error of => niincludes.h (18) : fatal error C1083: cannot open include file: 'NiVisaComponent.h': no such file or directory

    I checked a few path, "C:\Program Files (x 86) \National Instruments\MeasurementStudioVS2005\VCNET\Include.
    I found a lot of files, but only does not NiVisaComponent.h, anyone know how to download or is this file has changed the name?

    I already install the driver NI-VISA v15.0 but still does not have this file.

    I have not "C:\Program NIUninstaller Instruments\MeasurementStudioVS2005\VCNET\Include" because my laptop is 64-bit.

    Hello

    If you see the file Readme VISA 15, you'll see that Visual Studio 2005 is not supported. It seems that the most recent version of VISA that supports VS 2005 is Version 5.2 for c# / VB.NET and 5.0.2 for MFC C++ (with Measurement Studio 2009).

  • Update PT8.52 to 8.53 for cause of functional database HRCS90: dbtsfix.sqr # include file error

    People,

    Hello. I was installing Human Capital and Campus Solution 9.0 with PeopleTools 8.53 with Oracle Linux 5. My database server is Oracle 11 GR 1 material. Because the human database functional and 9.0 Solution Campus is written with 8.52 PeopleTools, I need to upgrade to 8.53.

    When I run the Task 4-1-3 script dbtsfix.sqr as below:

    Double-click the C:\PT8.53\bin\sqr\ora\BINW\sqrw.exe file and fill in the message:

    Report a name: C:\PT8.53\sqr\dbtsfix.sqr

    Username: MyName

    PWD: mypass

    Database: HRCS90

    Arguments of report:-ZIFC:\PT8.53\sqr\pssqr.ini-iC:\PT8.53\sqr-oC:\PT8.53\log\dbtsfix.log-garder

    After you click OK, the error message is as below:

    Cannot open # include file:'setenv.sqc'. No such file or directory. For PeopleSoft SQR: abandonment of the program.

    I checked and opened all # include files with Notepad in the C:\PT8.53\sqr directory, but still not the error message above.

    My question is:

    How to run the script dbtsfix.sqr in a correct way and solve the above error?

    Thank you.

    I usually have the following parameters in a shortcut to SQRW.exe on my desktop.

    [PS_HOME]\bin\sqr\ora\BINW\sqrw.exe-ZIF[PS_HOME]\sqr\pssqr.ini-i [PS_HOME] \sqr\-fC:\temp\output.htm-keep - printer: ht]

    If we take a glance at PeopleBooks, the-i parameter indicates where to look for include files:

    -Idir_list

    Specifies the list of directories looking for PeopleSoft SQR during the processing of the #INCLUDE directive when the include file does not exist in the current directory, and no path is specified for the file. Directory names must be separated by commas (,) or semicolons (;).

    For UNIX/Linux-based systems, if your shell uses semicolons as the command delimiter, you must precede each semicolon with a backslash (\). Always add the directory at the end of each directory name character. See the F indicator for a list of characters in the directory, sorted by operating system.

    When compared with your settings, I see a difference in this i - parameter

    -ZIFC:\PT8.53\sqr\pssqr.ini-IC:\PT8.53\sqr-OC:\PT8.53\log\dbtsfix.log-garder

    You may want to try adding a------after the path of the i - parameter. So that would be

    -IC:\PT8.53\sqr\

    Also, take a look on:

    SQRW.exe settings

    SQR - PeopleSoft Wiki error codes

  • Path relative to the parent document is ignored by the server web - classic ASP, the include files.

    About 5 years ago I started what was to be my last site ASP/VBScript/Windows. I obtained through the administration of the database with MS Access ADP files, the DW server behaviors and some third-party extensions. GoDaddy recently told us they were retiring the old hosting and database servers and migrate to new Windows with Plesk accounts. The database has now been MSSQL 12 and using a file ADP was released. So, I took a course accelerated in SQL Server Management Studio to migrate the database. If anyone needs help with SSMS let me know, but it's not where my problems are.

    I see two troublesome problems on this new hosting server.

    1. pages with an include file, include it where is a level or above of the page does not work. A specific example - there is a page in a folder that contains a Recordset. It refers to the connections in the site root folder, using the "... / connections / ' relative path of the document. I checked this by copying the folder connections at the same level, and by changing the include as a result path.

    2. everything I had was the internal server error, even if I use a web configuration file to display detailed error messages.

    3. in the server behaviors panel, the recordset does not appear as such - it shows as a command and therefore not launch the Recordset Wizard

    4. I removed the connection and scripts and then Redid the connection. He have not successfully tests unless I chose to use the local driver. I've never had to do before.

    5. I always use the remote server as the test server, but DW doesn't seem to see it. This new account has a web root of httpdocs, but which should not be part of the URL test serer. For now, I use a subdomain to access the site.

    Questions: Someone has all heard a server ignoring the "... / ' in a path relative to the document, Windows or other? This occurs only with files include ASP - CSS @import links seem to work well.

    All of this have to do with the use of a subdomain?

    Why don't my recordsets appear in the Panel of SB? (Too bad the WebAssist Extensions - they used to work, but are totally broken now.) (I don't use anyway - CC compatible versions, but they tend to work most of the time)

    Last question - is it possible to get an earlier version of the CC DW? I'm sure that my problems are both because of the current version as well as the new server platform and configuration.

    Log-in to Creative Cloud Desktop app and select filters & releases > previous Version.

    You should see CS6 in the drop-down list.  See screenshot.

    Your new server using classic ASP or ASP.net?  They are different.

    Includes: equivalent ASP.NET Server - Stack Overflow

    Nancy O.

  • Fixing sesx wav files after included files have been renamed?

    In an excess of end of year-house keeping, I embarked on a campaign of change of name of the hordes of recordings of concerts of classical music: of their original naming convention "ABCddmmyyyy.wav" in "ABCyyyymmdd.wav" format, I find most useful for research purposes.

    It was an easy solution to do a renaming in mass of all files and their accumulation of pk, pkf, cdl, wav, flac, mp3 and cue files (don't forget to set the file referenced within the queue names), but I'm wrong how ranger and keep files of sesx valid (with AA CS6). Usually such a session file may have several stereo tracks long, simultaneous, parallel, for example: 'ABCddmmyyyy.ORTF.wav', 'ABCddmmyyyy.AB.wav', ' ABCddmmyyyy_XY - soloists.wav ' etc., that convoluted volume envelopes had been applied carefully. Can how best I update the sesx to reflect the change of name? I'm not wanting to have to re - renowned import and lose volume envelopes?... or is - it possible to copy envelopes of volume of an old track to a fresh track?  Thank you.

    You can open your .sesx file in a text editor. The files used in your session are included at the end under the heading . Therefore, it is possible to edit files of session with the new file names. I would put all the changed files .sesx with a new name so that you always have the original if you want to return to them.

  • How to replace an include file information?

    Hi all - I have an application that allows users to modify the HTML of their custom headers and feet.

    I'm looking to give users a list of terms that are predefined to include in their pages that gets replaced when the header is displayed on the application.

    For example, the user edit header.html and put somewhere in xxxADVANCED_SEARCHxxx here in the position that they would like their search box to be.

    How can I include header.html in the web application so that I can change the xxxADVANCED_SEARCHxxx to < = template "/ advanced_search.cfm cfinclude" > so that proper research information are displayedin the text xxxADVANCED_SEARCHxxx place?

    I had nothing to do so I made a little demo for your application. Do something like that. You can try running this first and see the result, and then you can base your app in this approach.

    We will have 4 files for this little demo:
    1 layout.html - where your users can edit.
    2 xxxADVANCE_SEARCHxxx.cfm - it contains your search advance coded in cf. note that the given file name, this will mean later in the code
    3 xxxLOGIN_BOXxxx.cfm - it contains your coded connection box in cf. note that the given file name, this will mean later in the code
    4 render.cfm - this will give you the final result

    Suppose it's your html (layout.html) file where your users can edit:



    Untitled


    xxxADVANCE_SEARCHxxx

    ABCD efghi

    xxxLOGIN_BOXxxx



    ------------------------------------------------------------------------------------------ ------------------------------------

    Assume that it is the content of the xxxADVANCE_SEARCHxxx.cfm:






    ------------------------------------------------------------------------------------------ ------------------------------------

    Assume that it is the content of the xxxLOGIN_BOXxxx.cfm:



    username

    password


    ------------------------------------------------------------------------------------------ ------------------------------------------------------
    below the code for render.cfm that will give us the desired end result will be:



    <>
    action = "READ".
    file="C:\files\apps\cfapps\myTest\replace\layout.html".
    variable = "htmlContent" >












    #firstHTML ##remainingHTML #


    #htmlContent #.

  • I keep losing the line at the top of the page which includes "file, edit view, bookmarks, history, etc." I can get it by pressing lt + F8 but it goes again when I press one another key.how can I restore it permanently

    I have lsot the line in the spaces of the toolbar include 'file, edie, veiw, bookmarks, history, help' etc. ICAN get it by pressing Alt + F8, but it will when I press another button. How can I restore it permanently

    Press the Alt key to display the Menu bar, then open view > toolbars and select menu bar, so it has a check mark.

Maybe you are looking for

  • How to install Yosemite or Mavericks on Macbook Pro 2.2

    Help! My friend gifted me an iBook and I can download it on iTunes, but I can not read it there. Yikes! I need to update my OS X somehow. I have a Macbook Pro - 2: 2 apparently is a model of "end of 2006". It has an Intel Core 2 Duo processor and 2 G

  • Smartprint HP: / 5 error Code

    I see the same error as other users when tring to print a web page with HP smartprint: However I don't use 8 Win (which is the reported until now cause in the forum) but Win 7 (64 bit) & IE11, so must match the criteria to make it work. Can someone a

  • Satellite A300d-156 - to change the video card

    Hello! I have Toshiba Satellite A300d-156. An ATI Mobility Radeon HD 3650 video card is dead.I want to change the video card, but I don't know her size.I found this on ebay: http://www.eBay.com/ITM/new-ATI-Mobility-Radeon-VGA-card-HD-3650-1gb-MXM-II-

  • How to enable a disabled on Intel graphic display monitor.

    Hi, on my computer dual Intel graphics disappeared. I got the answer how to solve this problem, when I tried I discovered that some hoe the second monitor has been disabled. When I click on the second monitor, a window pops up saying it is disabled a

  • How to replace MAP of protected files?

    Hello everyone! I need to replace the two files (C:\Windows\System32\shlwapi.dll and C:\Windows\System32\uxtheme.dll) system, but Windows File Protection prevents me to do. Any ideas? Best regards Matthias