reproduced from Wind Yu Chong Unity3d Tutorial College
Introduction: PHP is a relatively simple programming language, even if not touched can be learned now.
PHP Tutorial Documentation
PHP100 Video Tutorial
Unity receives the output of PHP Hello world.
Enter the WWW folder, right-click New text document, named helloworld.php, open with Notepad, enter the following code, save.
<?php
Echo is similar to cout or print, which outputs text content in a Web page
echo "Hello world!";
?>
After that, open the browser input http://localhost/helloWorld.php, the page results are as follows.New Unity Project,Create an object, create a script Getecho, drag the script onto the object, the script as follows using unityengine;using System.Collections; public class Getecho:monobehaviour {void Ongui () {if (GUI. button (new Rect (0,0,100,50), "Getecho")) {Startcoroutine (GetText ());}} IEnumerator GetText () {www mywww = new WWW ("http://localhost/helloWorld.php"); yield return mywww;print (Mywww.text);}} Run, click on the top left button, that is, the console output the HelloWorld statement on the page, how simple?
Unity3d Tutorial Web Server Chapter: (Third speaking) PHP's Hello World