Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I made an HMTL menu and I want to add it to the page using PHP(I have some HTML and some PHP files).
If I use:
include('menu.html');
there is always something that isn't right.
So, how can I add the HTML menu using PHP? The menu must be on top, and the same as it is in HTML.
Have a look at this question: Question about including html page in PHP
If you have problems with the .css because they are included with relative path you need to set the relative path "relative" to the .php file
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am making a website using HTML. I am not familiar with PHP. I need the navigation and header part to be in a single place. i.e., Once I change the menus in one place it should reflect in all other pages. Kindly help me on this.
Thanks in Advance.
You could use include or require to add your Menu-Html file in every page you wish.
you could add something like this:
<?php
include('menu.html');
?>
wherever your menu should appear in your HTML, having a menu.html file of course.
and you'll need an apache server or any other that can 'read' your php files.
include php documentations
require php documentations
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
How run php,java script,asp,html,css file in the wordpress cms?
similar w3school.com
http://www.w3schools.com/php/default.asp
Wordpress is a CMS written in PHP, that is the server-side language used. HTML/CSS/Javascript will all work nicely with PHP (you can put all three directly into your .PHP files and they will be rendered).
ASP is a different server-side language, picking one or the other for your project is probably a good idea. (Also, I don't think w3schools is running Wordpress, it is their own ASP code)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I use this in htm file to include another htm file
<?php include("media/android.htm"); ?>
Is this safe?
Both of them are simple htm file with text and pictures.
Yes, it's completely safe. That's how PHP works.
But, keep in mind that's a php file, not html.
use jquery to load a file
$("#div1").load("media/android.htm");
Try this
include file without php
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have two text file. I want to compare this two text file and want to create new text file with difference of this 2 files
Old_file.txt Contents:-
XYZ,Desc,46,XYZ,1.6000,0
XYZ1,Desc,56,XYZ1,8.6000,0
XYZ2,Desc,66,XYZ2,10.6000,0
XYZ3,Desc,76,XYZ3,11.6000,0
new_file.txt Contents:-
XYZ,Desc,46,XYZ,1.6000,0
XYZ1,Desc,86,XYZ1,9.6000,0
XYZ2,Desc,66,XYZ2,10.6000,0
XYZ3,Desc,100,XYZ3,11.6000,0
Need file:- (new_file.txt - old_file.txt)
XYZ1,Desc,86,XYZ1,9.6000,0
XYZ3,Desc,100,XYZ3,11.6000,0
Thank You in advance.
You are coping what is usually refered as "longest common subsequence problem", there are a looot of implementations of the most common algorithm. You can spot the solution of your problem working on the script provided here.
You could use the Text_Diff pear package which is pretty robust. There's also the xdiff extension, which you can do this with, using the xdiff_file_diff function
xdiff_file_diff('Old_file.txt', 'new_file.txt', 'diff.txt');
Where diff.txt would be the resulting file with the comparison between the two files.