6 Replies Latest reply on Mar 11, 2011 3:27 PM by Nancy OShea

    PHP "NewBee"

    keldesignwise

      Hello,

       

      I'm trying to access dynamic related files so that I can edit the HTML meta tags, etc., from .php files.

       

      I know the reccomendation is to set up a local "test" server, however I do not have one available or an old computer in which to use.

       

      Can I use a remote server which there is no access but myself?

       

      If not, how do I acess these files, from my local system, so that I can SEO this PHP site?

       

      Thank you.

        • 1. Re: PHP "NewBee"
          osgood_ Level 8

          keldesignwise wrote:

           

          Hello,

           

          I'm trying to access dynamic related files so that I can edit the HTML meta tags, etc., from .php files.

           

          I know the reccomendation is to set up a local "test" server, however I do not have one available or an old computer in which to use.

           

          Can I use a remote server which there is no access but myself?

           

          If not, how do I acess these files, from my local system, so that I can SEO this PHP site?

           

          Thank you.

           

          You can still open and edit .php files locally in Dreamweaver without setting up any testing server you just won't be able to view them locally in a browser. But if youre just editing the meta tags then there's really no need to test the pages locally. Just do the editing and upload the amended .php files to the remote server, overwriting the old ones which are up there.

          • 2. Re: PHP "NewBee"
            keldesignwise Level 1

            Thank you for your response.

             

            This is exactly what I thought, however, when I open the PHP file in dreamweaver, I see no HTML (head) tags in which to edit.

             

            Sort of confused here. LOl.

             

            Would you like me to copy/paste what I see in DW?

            • 3. Re: PHP "NewBee"
              keldesignwise Level 1

              When I open the PHP file in DW, this is what I see:

               

              <? session_start();

              $phpEx="php";include_once("library/inc/usertop.php");

              $template = new Template;

              $template->set_filenames(array('body' => $tpl.'newreleases.'.$tplEx));

               

              $template->assign_vars(array('CATEGORY'=>"New Releases"));

              $template->assign_vars(array('DEFAULTVALUE'=>$prod_default_value));

               

               

              ////for Paging///////////////

              if(!empty($_GET['page']))

              $page=$_GET['page'];

              else

              $page=1;

               

              if(!empty($_GET['perpage']))

              $perpage=$_GET['perpage'];

              else

              $perpage=12;

               

              $newdate=mktime()-2419200;

               

               

              $result="select * from tbl_dvds_product where newreleases=1 and status=1 and del_status=1 and date>='".$newdate."' order by prodTitle  ";

              $cou=mysql_num_rows(mysql_query($result));

              $pagg_array=new PageResultSet($result, $perpage);

              $pages = $pagg_array->pagearraynew("perpage=".$perpage);

              $pre_pages = $pagg_array->getPageNav2new("perpage=".$perpage);

              $next_pages = $pagg_array->getPageNav3new("perpage=".$perpage);

              if($_GET['page']!=1 && $page!=1){

              $first_pages = "<a href=\"?page=1&perpage=".$perpage."\" class=\"link3\">First</a>";

              }

              if($_GET['page']!=$pagg_array->getNumPages()){

              $last_pages = "<a href=\"?page=".$pagg_array->getNumPages()."&perpage=".$perpage."\" class=\"link3\">Last</a>";

              }

               

               

              $record_rows1 = array();

              while($row=$pagg_array->fetchArray())

              {

              $record_rows1[] = $row;

              }

              if( ( $total_record = count($record_rows1) ) )

              {

              $d=($page-1)*$perpage+1;

              $count=1;

              $num_rw=1;

              for($i = 0,$c=$d; $i < $total_record; $i++)

              {

              $startrw='';

              $endrw='';

              $imglink='';

              if($num_rw==1)

              {

              $startrw="<tr>";

              }

              if($num_rw%2==0)

              {

              $endrw="</tr><tr>";

              }

               

               

              $prodID=$record_rows1[$i]['prodID'];

              if($record_rows1[$i]['altTitle']=='')

              {

              $rwalttitle=" ";

              }

              else

              {

              $rwalttitle=word_chop($record_rows1[$i]['altTitle'],4);

              }

               

              $prodTitle=word_chop($record_rows1[$i]['prodTitle'],4);

              $alttitle=$rwalttitle;

              $prodDesc=word_chop($record_rows1[$i]['prodDesc'],10)."...";

              $prodPrice="$".number_format($record_rows1[$i]['prodPrice'],2,'.',',');

              $date=$record_rows1[$i]['date'];

               

               

              $res=mysql_query("select * from tbl_dvds_images where prodID='$prodID' order by imgID limit 1");

              $rs=mysql_fetch_array($res);

              $imglink="uploads/productimages/smallimages/".$rs['imageName'];

               

               

              $validation='<script type="text/javascript">

              function chkValue'.$c.'()

              {

               

              if(document.frm'.$c.'.qty.value=="")

              {

              alert ("Please enter quantity , its can not be null.");

              document.frm'.$c.'.qty.focus();

              return false;

              }

              else

              {

              //document.write(document.frm'.$c.'.qty.value);

              if(!IsNumeric(document.frm'.$c.'.qty.value))

              {

              alert ("Please enter a valid quantity");

              document.frm'.$c.'.qty.focus();

              return false;

              }

              }

               

              if(document.getElementById("qty").value < 1)

              {

              alert ("Please enter valid quantity.");

              document.frm'.$c.'.qty.focus();

              return false;

              }

              function IsNumeric(sText)

               

              {

                 var ValidChars = "0123456789.";

                 var IsNumber=true;

                 var Char;

               

               

                 for (i = 0; i < sText.length && IsNumber == true; i++)

                {

                Char = sText.charAt(i);

                if (ValidChars.indexOf(Char) == -1)

              {

              IsNumber = false;

              }

                }

                 return IsNumber;

                

                 }

               

               

              }

               

              </script>';

               

              $videolink='';

              if($record_rows1[$i]['prodVideo']!='')

              {

              $videolink="<span class='contenttext3'  ><a href='proddetail.php?prodID=$prodID' ><img src='images/video_icon_small.png' alt='Play Video' border='0'></a></span><br /><br />";

              }

               

              $template->assign_block_vars('PRODUCTS', array(

              'ID' =>$prodID,

              'SNO' => $c,

              'VIDEOLINK'=>$videolink,

              'TITLE' =>$prodTitle,

              'SDESC' =>$prodDesc,

              'PRICE' =>$prodPrice,

              'ALTTITLE' =>$alttitle,

              'DETAILLINK' =>"proddetail.php?prodID=$prodID",

              'IMGLINK' =>$imglink,

              'CARTLINK' =>$prodQty,

              'STARTROW'=>$startrw,

              'ENDROW'=>$endrw,

              'VALIDATION'=> $validation

              ));

              $num_rw++;

              $c++;

               

               

               

               

               

              }

               

              $template->assign_vars(array('COUNT1'=> $total_record ,'PAGING'=>$pages,'TPAGING'=>$pages,'NPAGING'=>$next_pages,'FPAGING'=>$first_pages,'LPAGI NG'=>$last_pages,'PPAGING'=>$pre_pages,'NO_OF_PAGE'=>'No of Records <select name="no_page" id="inputtextfield" onchange="window.location.href='.$sep.$redirect3.'&perpage='.$sep.'+this.value">'.$common ->no_of_page($perpage).'</select>'));

              }

              else

              {

              $template->assign_vars(array('PAGING'=>"<div style='color:#FF0000'>No Record Found</div>"));

              }

               

               

               

              $template->pparse('body');

              include_once("library/inc/userbottom.php");

              ?>

               

               

               

               

               

               

              No Title, description or keywords tags. No <HEAD> either.

               

              How do edit what I can not see, and why do I not see it?

               

              Please help.

               

              Thanks so much!

               

              K

              • 4. Re: PHP "NewBee"
                Ben M Adobe Community Professional

                keldesignwise wrote:

                 

                When I open the PHP file in DW, this is what I see:

                 

                 

                {Lots of Code Here}

                 

                No Title, description or keywords tags. No <HEAD> either.

                 

                How do edit what I can not see, and why do I not see it?

                 

                Please help.

                 

                Thanks so much!

                 

                K

                 

                PHP pages are not always rendered in the browser.  In the same way HTML pages are.  PHP pages can just hold classes or other actions where processing is done.  This looks to be a processing script testing things out to pass back to the PHP document that is being displayed to the user.  Where else is file included in the grand scheme of things?

                • 5. Re: PHP "NewBee"
                  Ben M Adobe Community Professional

                  Also I will add one more comment.  Why can you not install a testing server on your local computer like a WAMP or MAMP installation (depending on OS)?

                   

                  MAMP - http://www.mamp.info/en/index.html

                  WAMP - http://www.wampserver.com/en/

                  • 6. Re: PHP "NewBee"
                    Nancy OShea Adobe Community Professional & MVP

                    I know the reccomendation is to set up a local "test" server, however I do not have one available or an old computer in which to use.

                    You don't need a slave computer to do local testing.  You can install Apache (WAMP or XAMPP)  on your work computer.

                     

                    Depending on how your site is configured, your <meta> and <title> tags may be contained in an include file such as header.php

                     

                     

                    Nancy O.
                    Alt-Web Design & Publishing
                    Web | Graphics | Print | Media  Specialists 
                    http://alt-web.com/
                    http://twitter.com/altweb