Jump to content

Simple question about php site and html files


Recommended Posts

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

 

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

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.

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

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).

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.

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.

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?

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.