| | |
how to fwrite an entire php page
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
i made a script to create a directory and file within the directory for someone who is registering at my site also knows as
www.socialemo.com/theirusername/index.php
but im stuck on the index.php file
I DONT KNOW HOW TO WRITE HTML AND PHP TO THE FILE
how am i supposed to write a page of html to the file?
and also i need some php script to it too
is it possible to write php to a file with fwrite or do i have to do something else entirely
*the reason i need php is the login check because the page isnt supposed to be accesses unless the person is logged in*
so i basically need to know how to include this into the fwrite script
and some tables and other html maybe a stylesheet include
AND THIS IS WHAT I HAVE SO FAR:
it works.. but i dont know how to put the php and stylesheets in and tables and stuff can anyone help me????
www.socialemo.com/theirusername/index.php
but im stuck on the index.php file
I DONT KNOW HOW TO WRITE HTML AND PHP TO THE FILE
how am i supposed to write a page of html to the file?
and also i need some php script to it too
is it possible to write php to a file with fwrite or do i have to do something else entirely
*the reason i need php is the login check because the page isnt supposed to be accesses unless the person is logged in*
so i basically need to know how to include this into the fwrite script
PHP Syntax (Toggle Plain Text)
<?php require($_SERVER["DOCUMENT_ROOT"] . "/xxxxx/checkforlogedinscript.php"); ?> hhhhhhhhhhhhiiiiiiiiii <a href="http://www.socialemo.com/xxxxx/signouts">sign out</a> Hi, you are in the session... ???????????????????????????????????
AND THIS IS WHAT I HAVE SO FAR:
PHP Syntax (Toggle Plain Text)
if(mkdir($documentroot ."/". $row['username'] , 0777)) { $contents = "uhhhhhhhh"; $profile = $documentroot ."/". $row['username'] ."/index.php" ; $fh = fopen($profile, 'w') or die("can't open file"); $contents = "uhhhhh\n"; fwrite($fh, $contents); fclose($fh); echo "<br> You can access your profile at <a href=\"http://www.socialemo.com/" . $row[username] . "\">www.socialemo.com/$row[username]</a> <br>"; } else { echo "There was a problem. Please <a href='http://www.socialemo.com/feedback.php'>contact</a> the administrator. ";
it works.. but i dont know how to put the php and stylesheets in and tables and stuff can anyone help me????
Last edited by SKANK!!!!!; May 20th, 2009 at 8:51 pm.
![]() |
Similar Threads
- How to 'refresh' a php page? (PHP)
- pass the javascript variable to php page (PHP)
- View HTML source in php page? (PHP)
- How Can I Pass A PHP Variable From One .php page to another (PHP)
- updating 2 HTML tables on one PHP page (PHP)
- page.php?page=1,2,3,4,..inf. (PHP)
Other Threads in the PHP Forum
- Previous Thread: Maintain time
- Next Thread: Nested Loop Question
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error fcc file files folder form forms function functions google howtowriteathesis href htaccess html image images include insert integration ip java javascript joomla ldap limit link login loop mail menu mlm mod_rewrite multiple multipletables mysql oop open parse paypal pdf php problem provider query radio random recursion regex remote script search server sessions sms soap source space sql strip_tags structure syntax system table template tutorial update upload url validation validator variable video web xml youtube





