cbsjeff Posted January 31, 2009 Share Posted January 31, 2009 Hi All, I 'm a newbie to this so please bear with me. I have a site that was created by someone else who is not around. I have dreamweaver cs4. The site is dynamic with php and mysql. I have managed to edit some php files and read variables from the database. Can someone please either explain the relation between php and HTML files to me or point me to a place I can find this out? Example: I can edit index.php but see very little code and nothing that seems to link to the index.HTML file. How does the index.php file link to the index file I see on the site with all of the graphics on it. I 'm use to editing index.HTML and seeing what looks like the full page but can't find a file on the site call index.HTML. Thanks, Jeff Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/ Share on other sites More sharing options...
npsari Posted January 31, 2009 Share Posted January 31, 2009 So, the files, are they Index.php or Index.html??? If they are index.html, then, you can view the whole page source easily If it is index.php, then, you will have to log in to his Control panel in order to open that php page Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-751092 Share on other sites More sharing options...
haku Posted January 31, 2009 Share Posted January 31, 2009 There are a multitude of different ways these files could link together. It all depends on how the programmer did it. Without seeing code, it's impossible to say, as there isn't just one way that it is done. And for that matter, they may not link together at all, and you may just be missing something. Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-751203 Share on other sites More sharing options...
cbsjeff Posted February 2, 2009 Author Share Posted February 2, 2009 All Files are ???.php. I did find a folder called html which has ???.html files in it but they are all older (not current) versions of the pages. I did find out however if I take a new .html file and save it as a .php file in dreamweaver CS4 I can edit the grachics. But I need to edit the grachis on some of the old files. What code would you need to see? Something like the index.php page? Thanks, Jeff Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-752793 Share on other sites More sharing options...
Yesideez Posted February 3, 2009 Share Posted February 3, 2009 If the site is written using PHP then look for the file "index.php" - depending on how the structure of folders is you're looking at it'll be with a few other .php files. If you're looking at the files on the server chances are you've had to enter a folder called something like "public_html" or "www" before you get to the website - look for "index.php" chances are this will be the first file. When a browser loads it goes through a list of index files with different extensions. I can't remember what order exactly they are listed but if one isn't found it looks for the next and so-on until it either finds one and displays it or finds nothing and you get a 404 (not found). Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-753077 Share on other sites More sharing options...
Andy-H Posted February 3, 2009 Share Posted February 3, 2009 I would hazzard a guess that the files are either connected via a form action or an include (/require) in the .html files. Navigate to the html files and edit them, look for include('../path/index.php'); or <form action="blah/index.php" method="post"> somewhere in the script. Also note that the functionality of include can be replicated using require/require_once / include_once so if there is no include() function look out for those. Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-753367 Share on other sites More sharing options...
trq Posted February 3, 2009 Share Posted February 3, 2009 I 'm a newbie to this so please bear with me. I have a site that was created by someone else who is not around. Don't meen to sound harsh but how exactly did you obtain this site? A newbie is going to be pretty lost inside of most php applications. Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-753391 Share on other sites More sharing options...
Rodis Posted February 4, 2009 Share Posted February 4, 2009 I 'm use to editing index.HTML and seeing what looks like the full page but can't find a file on the site call index.HTML. Maybe there isnt a file called index.html there isn't one necceserely. is there html inside the php file or is it template based? Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-754643 Share on other sites More sharing options...
alphanumetrix Posted February 12, 2009 Share Posted February 12, 2009 HTML is more likely to be used for the styling and developement of the page. The PHP is used for the programming and functioning of the page. Quote Link to comment https://forums.phpfreaks.com/topic/143209-simple-question-about-php-site-and-html-files/#findComment-760918 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.