2014-02-12 23:53
浏览 45

如何在php文件中包含.asp菜单文件? (ASP站点内的Wordpress博客文件夹)


ASP shopping cart site without any blog facility. Helping out a friend, I installed Wordpress into its own folder to sit with the ASP shopping cart and designed the WP theme to mirror the ASP cart style. Adding the blog to the ASP includes menu for the shopping cart. Now I am looking at including the ASP menu within the WordPress blog.

Issue: The ASP 'includes' menu file generates some drop down options on the fly via its CMS - so copying the generated html into the Wordpress Menu file is not the answer. Including the ASP file into the header.php file of Wordpress is the right way to go about it in my situation.

ASP File:


Code added into WP Theme header.php:

 <!-- #site-navigation -->
    ini_set (user_agent, "IE");
    ini_set (default_socket_timeout, "3");
    $filestring=file_get_contents("$theurl") ;        
    echo "$filestring";
 <!-- #site-navigation -->

The reason I have approached it via an "includes" style inside the PHP file is that it's very important for the Google to be able to follow the many URL's and indexed. Hence, not considering the iFrame approach.

My Solution above works within the blog as expected. BUT Is there a more elegant way of achieving the same which works faster within the server ?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongzhanyan3667 2014-02-20 17:06

    In agreement with Dave Mroz and other programmers I have spoken to - The solution I used above appears to be the best way of embedding an existing and dynamic ASP 'includes' file into WordPress in combining a WP blog into a standard ASP coded website. So I am marking it as answered.

    解决 无用
    打赏 举报

相关推荐 更多相似问题