I just did a quick site, with the includes function .... it works fine
http://www.d-zynzs.com/xwd2php/index.php ...... however I did notice that I had to use a php editor to change the file extension from htm to php.
I just did a quick site, with the includes function .... it works fine
http://www.d-zynzs.com/xwd2php/index.php ...... however I did notice that I had to use a php editor to change the file extension from htm to php.
If you are running Windows, you should just be able to rename the file without using a php editor. I do it all the time with the file explorer. highlight it, pause, then click it and you can rename it. If you click too fast, you may just open the file with the program associated with the extension. Alternatively, you can right click and select rename.
If you are using a Mac, I have no idea.
Chris
LotsMoreHosting.com
Some servers are set to parse all files with .htm or .html, looking for php scripts but obviously this is inefficient of only 1 page in 100 has any. So most servers will only parse for php if the suffix is .php.
It would be a help if you can specify the suffix in XWD.
Yes I understand this fact.A php page source is entirely different to standard HTML.
Web Designer hasn't been designed to create PHP scripted sites.
I am not suggesting that XWD does or should create php pages.
Yes I do this now.There is away around it, and that is to use the <? includes_once "";?> or <? required_once "";?> code,
This way it will include the PHP function you want to use, without altering the HTM/HTML output.
Simply just use the "Replace with HTML" in the Website properties - placeholder dialog box.
Yes exactly! This is exactly why I am asking for the ability to change the file extension. With other web builders, I can choose an extension to match my scripts. The pages are generated in html only and scripts work fine.however, you do need to use the .php file extension on your pages, and to have the code or function on a seperate file eg: phpcode.php
Yes. I agree. Have done this for years to run specific includes. Works well.One example: a secure php form script uses includes but will only work with the .php extension. The rest of the page is standard html. The htaccess file is set to read these files just fine. I have this script running on 4 websites, all written in html, each has a .php file extension to work with the includes.You can take any html page and change the extention to php and the file will display the same. The only difference is that the server will parse the file for any php. If nothing is found, just the html is displayed.
php and html mix very well in a file.
Yes. It would!!Some servers are set to parse all files with .htm or .html, looking for php scripts but obviously this is inefficient of only 1 page in 100 has any. So most servers will only parse for php if the suffix is .php.
It would be a help if you can specify the suffix in XWD.
Exactly. XWD will not change the extension so every time it exports and publishes, it must be modified manually and uploaded manually to the site. This is truly redundant work. If you modify the page just once a week, over a year that is 52 edits to the .php extension and 52 manual uploads that could be simply avoided if the program allows assignment of file extension.however I did notice that I had to use a php editor to change the file extension from htm to php.
The problem is magnified further because at this time, XWD updates all page every time it publishes. So each time, it would send the filename.htm file to the web instead of a filename.php. Now there is manual effort to remove the .htm version of the page since it is not needed or wanted.
Manually editing the file extension is not difficult but add it up.
Time really adds up for something that could be easy for the user to specify using a simple drop-down box with choice of page extension: htm (default), asp, php, shtml.
The manual can simply state that all pages are written in html code. The choice of file extension is allowed for use of included scripts that require a specific file extension. Please consider this for the wish list. It would greatly extend the ability of XWD.
-Samantha
"Try to live your life so that you wouldn't be afraid to sell the family parrot to the town gossip." Will Rogers (1879 - 1935)
Are you aware that pages with php extension will not work in html preview, only online?
John.
John,
This isn't true(maybe only for the preview of xwd)
even my txt/html editor(pspad) can preview php
(i know it will not show php scripting but the html will show)
Hans
Do links like: "page2.php" work in IE with WD exported pages locally?
Export 2 page site, rename second page file with the php extension. Make sure that links in the first page are corrext (with php extension). Open first page in IE and click on link to the second page (the php). Does it work?
John.
First, I have to say that I'm bewildered that this simple feature still is not in Xara. ?!?
That said, I believe this is a complete list of your options:
- Export from Xara, rename each .HTM file to .PHP/.SHTML, as needed, & manually upload. There is free software available from sites like download.com that can mass rename files.
- Upload normally with Xara, and rename on the server. There is free CGI software from sites like superscripts.com that can be installed on your server to mass rename files.
- Upload with Xara, and tell the server to parse all .htm file types for PHP/SHTML statements. This is done by adding/modifying the .htaccess file on linux servers, although it's turned off or locked in by some hosting outfits. It goes in the area with your .htm files. Dunno if there's an equivalent on MS servers. Here's the code for the .htaccess file.
RemoveHandler .html .htm
AddType application/x-httpd-PHP .PHP .htm .html
For SSI, substitute SHTML for PHP in the above lines. Capitalization must match your file extension.
- Use iframes in a placeholder instead. (Included only for completeness.) Takes the load off the server, but it bogs down the user’s browser. And if they use an older, or non-MS browser, it may display incorrectly or not at all. Doesn’t work for some forms of dynamic content.
- Use JavaScript in a placeholder instead. (Included only for completeness.) Takes the load off the server, but it bogs down the user’s browser. And if they use an older browser, or have JavaScript turned off, it may display incorrectly or not at all. Doesn’t work for some forms of dynamic content.
In general: If you have lots of traffic, and only a few files with PHP/SSI statements in them, having the server parse all of them for PHP/SHTML statements may needlessly bog down your server. That is, you may want to rename selectively. If this is the case, and you do a lot of work on your site using Xara, you might consider setting up a script that renames just the files that actually have PHP/SHTML statements. There are lots of free and commercial scripting programs around, although most of them are elephant guns for this particular rabbit.
Pulleeeeze can we have set-able suffixes - at least site-wide, and ideally by page. It does not seem to be in XWD7. Pity.
Bookmarks