js..html...代码
<div id="content_1_body">
<?php
include('admin/conn.php');
$query=$pc->fn_selectc("news_sm","delstate!=0 and type='smadmin'");
$totalnum=$pc->row($query);
$pagesize=10;
$page=$_GET["page"];
............ ?></div>
file_get_contents()方法输出.php页面另存为.html碰到php处理代码怎么办?。。不使用伪静态如何解决这个问题?小弟有个想法,把file_get_contents()输出的<?php?>代码提取出来放到php代码里面执行成功后,获取成功后的源码,然后把源码在复制回file_get_contents()里面这样能行吗?
<div id="content_1_body">
<?php
include('admin/conn.php');
$query=$pc->fn_selectc("news_sm","delstate!=0 and type='smadmin'");
$totalnum=$pc->row($query);
$pagesize=10;
$page=$_GET["page"];
............ ?></div>
file_get_contents()方法输出.php页面另存为.html碰到php处理代码怎么办?。。不使用伪静态如何解决这个问题?小弟有个想法,把file_get_contents()输出的<?php?>代码提取出来放到php代码里面执行成功后,获取成功后的源码,然后把源码在复制回file_get_contents()里面这样能行吗?
"
file_get_contents()发送的是http请求~获取的是脚本执行后的结果!<?php?>中的已经执行输出了!例如:$str = file_get_contents("http://localhost/xxx.php");//获取页面执行结果
file_put_contents($str,'xxx.html');//生成静态页面