Jump to content

changing path in PHP script


minbak

Recommended Posts

I have encountered a little bit problem here when I transferred my site to new host.

My new host doesn't allow FOPEN in the PHP code to access a URL.

So someone suggested me to change from the

Original code
http://www.Motortradermalaysia.com/ShowBan...ype=468x60'

to suggested code
ShowBanner.php?BannerType=468x60

Am I right?


My problem is I could see the file of ShowBanner.php but not ShowBanner.php?BannerType=468x60.


?BannerType=468x60
Where could I find this file?

This is the uploaded banner by the user.

What is the correct code?
Link to comment
https://forums.phpfreaks.com/topic/15130-changing-path-in-php-script/
Share on other sites

?BannerType=468x60 is creating a variable in a superglobal array called $_GET.  You need something in your code to tell it what to get/do.  If that's a size for an image you might echo an img tag with the correct size or similar.  Unless you specifically tell it to look for a file, it's just passing the banner type variable to the page.

Also, when you write in for help, including the page code always helps.  Just remmeber to scrub out any personal data (DB passwords etc.)

Good luck and I hope this helps.

The original code is

<?
include_once($BannerPath."/ShowBanner.php?BannerType=120x60");
[color=red][font=Verdana][b]?>
</center>
</td>


  <td valign=top style="padding-top:5" width=600>  <div align="center">
    <?
include_once($BannerPath."/ShowBanner.php?BannerType=468x60");
?>
  </div>[/b][/font][/color]


What is the correct code to avoid using Fopen ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.