I am analyzing my project, which is created encoding:
[QUOTE]
<? php
$ File = ‘page’ , / / stores the filename
/ / Create the file
$ newFile = fopen ( $ file . ‘php.’ , ‘w +’ );
if ( $ newFile ):
/ / open the file by placing the pointer in writing
moves the pointer to the beginning of the file
rewind ( $ file );
if ( fwrite ( $ file , $ file_insert )): / / Inserts the content on the page created
echo ‘File updated successfully’ ;
endif ;
fclose ( $ file );
else :
die ( ‘Could not open file’ . $ file . . ‘php’ );
endif ;
else :
die ( ‘Could not create file.’ );
endif ;
And also in a way with less code like this:
[QUOTE]
<? php
$ File = ‘beta’ ,
$ fn = “/ template.txt.” ,
if ( copy ( $ fn , $ file . ‘txt.’ )) {
die ( “Success!” );
} else {
die ( ” Error copying file ” );
}
>
Now I want to create this:
-> I will have a form on a page in the administration with name_of_a_page, title_of_a_page, meta_description, meta_tags and content.
Explanation: (name_of_a_page (name_of_a_page.php remain in the url), title_of_a_page (will be the title of the page), and other key targets (robotic search search engines), content (we have created content for the new page) words).
It will open a file called template.php (as in the code above) and take the data from $ _POST [] forms write to a page $ temp and after saved on the bench with an insert (page.php)
Example: this is the page with client side :: functions to display content off the bench. + Would be – so I need to create.
[QUOTE]
? < php
static $ table = ‘page’ ,
$ page = $ _GET [ ‘name_of_a_page’ ];
switch ( $ screen ):
case $ page , / / parameter passed through the menu click
sql_seach $ = $ pdo -> prepare ( ‘SELECT *‘ . self :: table . ‘name_of_a_page WHERE =’ . $ page );
$ pdo -> execute ( $ sql_seach ),
if ( $ exists_as_tab_menu AND $ tab_page_data ):
if ( $ sql_seach ):
/
* In this case it would open a file with all formatting eg template.php
* Cattle bank would be in here </ div>
else :
/ * loads an error page the same way but where would
<div Id=”content”>
* /
endif ;
else :
/ / Did nothing since there is new content in the database.
endif ;
break ;
endswitch ;
For client (browser client _ ie the action of the client side) based on a menu (have a loop checking each new content that will have on the table menu in the data base, whenever there is a new menu registered on the bench it checks:
Have a menu, if yes check for content to be displayed on a new page, if both is yes
makes the display of the menu and when you click the menu, it passes the parameter to url and displays the page.
Not sure on where I am going wrong.
Can someone help me in this creation?
Thanks