Adam77 Posted March 15, 2014 Share Posted March 15, 2014 hey everyone, my html code has php code in it, but the php does not run at all . the php code run fine separatly from the html . any suggestion ? i add my html plus a short php code(an echo cmd) in it just for you to understand and tell me what am i doing wrong .. real.html Link to comment https://forums.phpfreaks.com/topic/286998-doesnt-read-my-php/ Share on other sites More sharing options...
Ch0cu3r Posted March 15, 2014 Share Posted March 15, 2014 The code should work provided the server is configured to parse .html files as PHP. If you do not have access to the server you'll need to rename the file to have a .php extension instead Link to comment https://forums.phpfreaks.com/topic/286998-doesnt-read-my-php/#findComment-1472736 Share on other sites More sharing options...
Adam77 Posted March 15, 2014 Author Share Posted March 15, 2014 hey man, im kind a begginer as you probably understand . im using my local host right now with xampp control panel, can you tell me more specific what should i config ? as i said the html file runs fine through the local host but without the php that in it . appreciate it man Link to comment https://forums.phpfreaks.com/topic/286998-doesnt-read-my-php/#findComment-1472738 Share on other sites More sharing options...
Ch0cu3r Posted March 16, 2014 Share Posted March 16, 2014 You are best of renaming your html files to end in a .php extension. Most servers are not configured to parse html files as php. Link to comment https://forums.phpfreaks.com/topic/286998-doesnt-read-my-php/#findComment-1472777 Share on other sites More sharing options...
Adam77 Posted March 18, 2014 Author Share Posted March 18, 2014 thanks brother Link to comment https://forums.phpfreaks.com/topic/286998-doesnt-read-my-php/#findComment-1473018 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.