Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
can anyone tell me that how to embed a xaml & html5/css3 scripts into php script ....?? please give separate solution for both .....

xaml -> into -> php
html5/css3 -> into -> php

Rephrased Question :-
somewhere i saw that php can works like glue between two different languages.
i think that means u can add any other language into php script by some ways (that's what i want to know how to do this?).

so now u can see that
1. i just want to add some of xaml codes into a php script
2. i just want to add some of html5/css3 codes into a php script

so please tell me how to do this.! very thankful to you in advance
Posted
Updated 16-Nov-12 23:42pm
v2
Comments
Sergey Alexandrovich Kryukov 16-Nov-12 21:50pm    
Incorrect question, probably based on some misconception, I'm not sure.
And who told you XAML is related to PHP? Didn't you mix up something? In principle it can be used, but "embedding" is just a wrong concept.
--SA
Vishal Dwivedi 17-Nov-12 3:39am    
sorry for using 'embed' actually im a newbie and trying to sort out my confusions and
doubts here. actually somewhere i saw that php can works like glue between two different languages. i think that means u can add any other language into php script by some ways (that's what i want to know how to do this?). so now u can see that
1. i just want to add some of xaml codes into a php script
2. i just want to add some of html5/css3 codes into a php script

very thankful

1 solution

The question as it is makes little sense. First of all, you need to understand how PHP or other server-side technologies work. Nothing is really "embedded" in PHP.

Any PHP file is actually some kind of template of what should be generated as a HTTP response in response to some HTTP request. So, this is some text file with fragment of PHP code in it; such fragments are escaped using the delimiters <php and ?>. Such syntax is chosen to avoid interference with HTML syntax: the delimiters cannot be interpreted as HTML text elements (because "greater then" and "less then" brackets are not escaped with HTML entities), nor they are valid HTML tags. As the server side the PHP module first locates and interprets PHP fragments, it does not creates conflicts.

Actually, PHP code could generate a resource of any content type via generation of appropriate HTTP headers, but then the whole page should be the PHP code.

On HTTP request with URI pointing to some PHP page (which a HTTP server recognized by the file name or index file name, looking at the path and the content of some directory of the server's host file system), the PHP module loaded by the server interprets all the PHP code fragment and executes them; its generates some content to be inserted in the PHP file content in the place where the code fragment was. This is repeated sequentially for all such fragments.

If you understand this mechanism, you can generate any thinkable content. The content formatted according to the content of all fragments of PHP file is sent in the HTTP response to the client. No analysis of validity of the resulting content to be sent is not analyzed on the server side — the HTTP response is sent as is. On the client side, the content is loaded by the browser and interpreted according to the content type received in the HTTP header: rendered, JavaScipts are loaded, interpreted and executed, and so on.

Are you getting the idea? You should first separate what happens on server and client side. If you also know how HTML works, your questions about CSS are reduced to understanding on how it works in HTML. I hope you know it, or can read about it.

As to XAML, it is not directly related to PHP. XAML is used in WPF and Silverlight which also have nothing to do with PHP. The only thing about XAML can be some XAML library for reading and processing XAML files, which can be use as the content on client side only or processed on server side as any other data file. This is quite possible, because XAML is an extremely wide standard. A part of XAML can be used just a vector graphic format understood by browsers directly of via plug-ins. Alternatively, such graphics can be rendered as bitmap graphics purely on the server side and delivered to the client side through HTTP response as a bitmap content type (such as JPEG or PNG).

For further detail, please see:
http://en.wikipedia.org/wiki/PHP[^],
http://en.wikipedia.org/wiki/PHP_syntax_and_semantics[^],
http://www.php.net/[^].

See also:
http://en.wikipedia.org/wiki/HTTP[^],
http://en.wikipedia.org/wiki/HTTP_header[^],
http://en.wikipedia.org/wiki/HTTP_HEAD_request[^].

—SA
 
Share this answer
 
v2
Comments
Vishal Dwivedi 17-Nov-12 3:35am    
hey ...
such a very thanks for this brief description ...
actually i should change some of my words ....

somewhere i saw that php can works like glue between two different languages. i think that means u can add any other language into php script by some ways (that's what i want to know how to do this?). so now u can see that
1. i just want to add some of xaml codes into a php script
2. i just want to add some of html5/css3 codes into a php script

very thankful
Sergey Alexandrovich Kryukov 17-Nov-12 21:14pm    
It's not glue between language or something like that. "Another languages" from standpoint of PHP, or any other server-side technology is no more then just data, processed just the way I described; can you see it? I hope things are getting more clear for you now -- so, consider accepting the answer formally (green button) -- thank you.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900