 |
 | php website setup |  | omlac | 21:22 2 Mar '09 |
|
 |
hi all i have got php files(which make up a website) and i have been asked to help correct some errors on the site, i need to setup the website, i have got dreamweaver on my machine to edit the php files, i havent used PHP before(just helping a friend), how do i go abt setting a site using these files
Thanks
|
|
|
|
 |
|
 |
Well, it's so general. What's your problem exactly ?
|
|
|
|
 |
|
 |
well i have got a folder of php files which was used to build a website, how can i run this application on my machine. like running in debug mode using .net framework. everytime i try to run this app it request for athe dreamweaver sites but php doesnt run in dreamweaver. by running i mean opening a php page eg index.php in dreamweaver and the F12 in dreamweaver. is this how im supposed to do it.
|
|
|
|
 |
|
 |
Notepad, or Textpad is pretty good. I don't know of any IDE to edit php files like dreamweaver.
|
|
|
|
 |
|
|
 |
|
 |
You need to set up your computers local server to parse php files you can either install php on iis or install it on apache (try googling "xampp").
With xampp: - install xampp and make sure apache is running - put website in htdocs folder (ie. c://xampp/htdocs/[websitefoldername]). "htdocs" folder is your web doc root (like "wwwroot") - run dreamweaver - choose "manage sites" from the file panel - click "New" - "advanced" tab - give site name and enter the path to your website as local root folder (ie. c://xampp/htdocs/[websitefoldername]) - category -> testing server - sever model = php mysql - access = local network - testing server folder = the path to your website as local root folder (ie. c://xampp/htdocs/[websitefoldername]) - url prefix = http://localhost/[websitefoldername] - open a file and press F12
Hope that helps
|
|
|
|
 |
|
 |
thanks fro the reply i still cant run the app after installing php on iss.
the sites are working fine in dreamweaver but on f12 or http://localhost/mytest/index.php the pages keeps opening in dreamweaver. but http://localhost/mytest/index.asp ie an asp page works fine even from dreamweaver
Regards
|
|
|
|
 |
|
 |
Either your site manager isn't configured correctly in DW or your Server setup isnt parsing php files.
If you put a blank php doc in your wwwroot it should load up as a blank webpage if you open your browser and go to localhost/pathtoyourphpfile.php. If it doesn't then you know your server isn't parsing the files.
If your site doesn't have to be tested on IIS then I would suggest trying apache (xampp) as described before.
|
|
|
|
 |
|
 |
thanks on installing php which iis should i use, there are two of them appearing regards
|
|
|
|
 |
|
|
 |
|
 |
if you do use apache. you have to disable all IIS services. (start->run->services.msc)
|
|
|
|
 |
|
 |
i still cant run the app after installing php on iss.
the sites are working fine in dreamweaver but on f12 or http://localhost/mytest/index.php the pages keeps opening in dreamweaver. but http://localhost/mytest/index.asp ie an asp page works fine even from dreamweaver
Regards
|
|
|
|
 |
|
 |
If you want to run PHP under IIS, IIS-Aid website[^] has a handy installer
I prefer running PHP under IIS if you're developing on a Windows box. You also have to go into the IIS Management Console and turn on scripting for the folders under your wwwroot that you want to run PHP scripts in.
There's a handy getting started tutorial in the PHP documentation [^]as well, also it tells you how to manually install PHP.
|
|
|
|
 |
 | Global variable across multiple files and multiple code snippets |  | Joan Murt | 10:51 2 Mar '09 |
|
 |
Hello all,
In our IT department two of my coworkers have developed a new web page for our company... in PHP 5 it works like charm but in PHP 4 it seems that it doesn't work...
The main problem they have found is that a variable declared in a file that gets included is not working as in PHP 5...
How would you make a global variable in PHP 4?
It must be capable to work across multiple files and across different PHP snippets.
Thank you in advance...
PS: I hope the question is clear enough, I'm not doing that PHP work and they are not into CP so I thought to ask it here... I have always received good comments...
|
|
|
|
 |
|
 |
Joan Murt wrote: How would you make a global variable in PHP 4?
As far as I know , there isn't a difference between PHP4 & PHP5 in define a global variable ! Just define them outside of a function or if you use OOP PHP, define them in Public.
|
|
|
|
 |
|
 |
If you want to use a varible thats declared outside of a function, from within the function you will need to declare it in the function. For example, with the following code:
$var = "asdf";
function printVar1(){ echo $var; //this will not work because the variable's scope is not within the function }
function printVar2(){ global $var; echo $var; //this will work since we told the function to use a variable from the global scope }
Joe Ceresini Network Engineer jceresini@hostmysite.com Hostmysite.com
|
|
|
|
 |
|
 |
Message Automatically Removed
|
|
|
|
 |
|
 |
Fuck off, No one cares about your shit site.
|
|
|
|
 |
|
 |
You really want to know my thoughts? Do you really? Do you really want to take a look into my disturbing mind, or are you just a moronic troll who should be removed from the vicinity of a keyboard for the benefit of all involved? Look - do you really think we are so stupid that we wouldn't realise you had something to do with this company? Seriously, if you want to advertise the company then pay for a f***ing advert. The fact that you've treated people like idiots means that we will want nothing to do with your company because you are so unprofessional.
|
|
|
|
 |
 | I need code apriori algorithm in PHP |  | chin4186 | 3:16 26 Feb '09 |
|
 |
hello frens, i am doing project which related to apriori algorithm in php...
really need helps from u all.....
thanks
|
|
|
|
 |
|
 |
Amazing, not a single question. I reread it even to double check, and nothing. Caput. Finito. Zilch.
|
|
|
|
 |
|
 |
chin4186 wrote: really need helps from u all
With almost 6 million CodeProject members, when will you read all our replies? Wouldn't it be more efficient to do a little Google search and visit and read say the first 10 links it comes up with?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
 |
|
|
 |
 | website page shown broken however it is not actually |  | aditya13 | 23:35 23 Feb '09 |
|
|
 |
|
 |
Are you here only to advertise a site?
|
|
|
|
 |