• Resolved isolmac

    (@isolmac)


    I use a simple php code to parse a php file (epg.php). It works properly (now live working) echoing a div with echo return, between other divs.
    I’m trying to modify the code just in case epg.php can’t be downloaded.

    (@include(“epg.php”)) or die(“<span class=\”sonando\”>” . “Directo” . “</span>”);

    When I delete epg.php for testing, this div is returned, but it doesn’t load the rest of wordpress page.
    I don’t know why when answer is the same when exists and doesn’t only changing innertext in div, when it doesn’t, the return is ok, but not the resto of page.
    Wondering Probably is not plugin issue…
    Anyway, can you help me?

    Thnks in advance

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter isolmac

    (@isolmac)

    Reply to myself, wordpress doesn’t like die. I solved this way:

    if(is_file('epg.php')){
    		 include 'epg.php';
    	 }else {
    		 $xmltext= ""; // this is the name of var to parse within epg.php
    	 }

    This way I echo “Directo” in case parsing result is “”.
    Thanks

    • This reply was modified 2 years ago by isolmac.
Viewing 1 replies (of 1 total)
  • The topic ‘Die return not working’ is closed to new replies.