Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用.htaccess使网页在php中动态创建其他页面?_Php_.htaccess - Fatal编程技术网

如何使用.htaccess使网页在php中动态创建其他页面?

如何使用.htaccess使网页在php中动态创建其他页面?,php,.htaccess,Php,.htaccess,我需要知道如何使一个php页面动态创建其他页面 使用“.htaccess”文件,我知道动态创建页面的方法 使用“PHP”,但当我尝试创建这个新的 页数 <?php foreach ($group as $key => $value) { $myfile = "editpage-$key.php"; $fh = fopen($myfile, 'w'); $stringdata = ' <?php $grou

我需要知道如何使一个php页面动态创建其他页面 使用“.htaccess”文件,我知道动态创建页面的方法 使用“PHP”,但当我尝试创建这个新的 页数

<?php
    foreach ($group as $key => $value) {
        $myfile = "editpage-$key.php";
        $fh = fopen($myfile, 'w');
        $stringdata = '
        <?php

$group = array(
    "0" => array("name"=>"Ahmed" , "age"=>"21" ,  "school"=>"Ahmed School"),
    "1" => array("name"=>"Mahmud" , "age"=>"22" ,  "school"=>"Mahmud School"),
    "2" => array("name"=>"Israa" , "age"=>"23" ,  "school"=>"Israa School"),
    "3" => array("name"=>"Lamiaa" , "age"=>"24" ,  "school"=>"Lamiaa School"),
    "4" => array("name"=>"Marwa" , "age"=>"25" ,  "school"=>"Marwa School"),
    "5" => array("name"=>"Amr" , "age"=>"22" ,  "school"=>"Amr School"),
    "6" => array("name"=>"Hassan" , "age"=>"23" ,  "school"=>"Hassan School"),
    "7" => array("name"=>"Osama" , "age"=>"25" ,  "school"=>"Osama School") );
    echo "name is ".$group[0]["name"];
?>

        <!DOCTYPE html>
        <html>
        <head>
        <title>Edit Page</title>
            <style>
    #header {
        height :170px;
        width : 100%;

动态创建其他页面?是的,但使用.htaccess文件,我知道如何使用php创建页面,但我面临一些问题,您到底想实现什么。如何使用php创建什么?你上面的代码实际上在做什么?我只能看到您正在创建一个字符串,然后输出一些html。顺便说一句,你没有使用htaccess来“创建”任何东西。你不明白这个问题的答案试图表达什么。您只需说出单词“
.htaccess
”和“create”和“page”。。。