Jump to content
Sign in to follow this  
Saquib Rizwan

Will you learn PHP in 2017? Or is it considered to be the bad language ?

Recommended Posts

I am a newly graduate developer and I really like to work on PHP. I have a good concept of core PHP and OOP in PHP. I was going to learn the framework now but the thing which make me hesitate about it is that I have seen many developers around the world are opposing PHP and saying that it is a bad language. So my question is should I learn PHP and if yes which framework should I learn first.

Share this post


Link to post
Share on other sites

I would recommend learning JavaScript over PHP, knowing JavaScript well will enable you to build apps across the stack as it can run both on the client, server and many embedded systems are also running JavaScript.

You will also pick up things like functional programming which is a different paradigm to OOP and is rapidly growing in popularity. There are many other languages too and while PHP is popular it's not the best paid because of how common PHP devs are and developers in languages such as JavaScript are becoming increasingly sought after.

 

All this said whats more important than learning individual languages is learning programming fundamentals, data structures and how to write clean code. These skills are transferrable to any language.

If you want to give JavaScript a go I recommend you begin here https://github.com/getify/You-Dont-Know-JS/blob/master/preface.md

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

GO ahead and learn Laravel, one of the most powerfull frameworks.

 

 

"Laravel is a free, open-source PHP web framework" - Is this not PHP?

 

Back to the OP if like to work with PHP then go for it, good PHP developers are the reason things like Laravel and WordPress exist. Learning foundation PHP IMO is much better than learning a framework, just like in the JS world a Javascript developer is better than one who only knows jQuery, sure know both but understanding the actual foundation language is what will make you stand out from the crowd.

Edited by BrowserBugs

Share this post


Link to post
Share on other sites

 

While it is important to learn the fundamentals of the language, I wouldn't recommend doing much serious development in pure PHP. Frameworks like Zend, Symfony and Laravel are high quality and will strip away a lot of boiler plate that you would otherwise have to write yourself. Generally speaking you'll find these frameworks have lots of very well written modules that can be reused all over the place, and because they're maintained by teams and used by thousands of people the world over, they tend to be much more secure and stable than code you would likely write yourself.

 

They save a tonne of time, teach good strong OOP practices and are generally of such high quality that using them and learning how they all work will turn you into a better developer. For almost anything in PHP I would use a framework of one kind or another.

 

I'm not discounting the frameworks, just pointing out that understanding the foundation of what these modules do would be beneficial, at the end of the day some people write these frameworks, unless they use frameworks in frameworks?

 

I'm having trouble finding a real auto electrician at the moment, simply because unless they can plug in my car for a diagnostics code they are clueless, but a real auto electrician can diagnose with resistance etc and not simply rely on software telling them which unit might be at fault. Similar to WP devs lol.

Share this post


Link to post
Share on other sites

At the end of the day our jobs are to write software with as few bugs as possible. While it's important to learn low level to gain a stronger understanding these frameworks abstract away a lot of boilerplate and greatly reduce the amount of code you have to write - in turn reducing the probability of bugs. Also means you have fewer tests to write.

 

These frameworks are merely tools.

When you employ somebody to perform a task you expect them to use the best tools for the job. Raw PHP or RAW Node is very rarely the best tool for the job. The strongest engineers will know when to use what tool, I work with some of the strongest developers in the industry - Paul can attest to that - they use frameworks and libraries very regularly. They could very easily build from scratch but that is not what they get paid to do.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

In order to use these frameworks you usually need to have a strong understanding of OOP for example, so actually you can't really use them until you comfortable with the language itself. Most amateur/new php programmers would struggle to even use them. They're not tools for amateurs - kinda the opposite...

 

They could very easily build from scratch but that is not what they get paid to do.

 

This was my point, in both cases the foundation knowledge is there. I understand the use of frameworks, can see the benefit of them, however the main bee in my bonnet is because the majority of questions on here is stuff like "why doesn't this work' when they are using something like bootstrap yet they don't even understand the principle of float. Do we learn Bootstrap over css?

 

So back to the OP, is php a 'bad' language?

Share this post


Link to post
Share on other sites

 

 

This was my point, in both cases the foundation knowledge is there. I understand the use of frameworks, can see the benefit of them, however the main bee in my bonnet is because the majority of questions on here is stuff like "why doesn't this work' when they are using something like bootstrap yet they don't even understand the principle of float. Do we learn Bootstrap over css?

I completely agree A developer absolutely should learn CSS - I wouldn't even bother with Bootstrap, My own Nebula, or BBC's Grandstand are far better. Think of Bootstrap as an all bells and whistles product like WordPress. Nebula is more like Laravel - It's a true framework and makes no upfront design decisions about what your application is or how it looks. It's just architecture.

 

As for JavaScript I heavily use React. But I would never instruct a beginner to begin with it. They should first learn JavaScript and do so to a high standard, then look to a framework like React. However in production you should always use the best tools at your disposal for a given task :)

Share this post


Link to post
Share on other sites

I completely agree A developer absolutely should learn CSS - I wouldn't even bother with Bootstrap, My own Nebula, or BBC's Grandstand are far better. Think of Bootstrap as an all bells and whistles product like WordPress. Nebula is more like Laravel - It's a true framework and makes no upfront design decisions about what your application is or how it looks. It's just architecture.

 

As for JavaScript I heavily use React. But I would never instruct a beginner to begin with it. They should first learn JavaScript and do so to a high standard, then look to a framework like React. However in production you should always use the best tools at your disposal for a given task :)

 

But i think some of the good things about bootstrap is you can do things like class="btn btn-sm btn-primary" to create a button etc.. as from what i'm understanding if i used your framework I would have to write the css to actually create a button instead of using classes that are already built in for this task. Is that correct? If that is indeed the case um why would i wanna write the css for my own buttons and use your framework then to just use bootstrap. Doesn't seem to time saving to me. But then again i've never used yours so I could be off base in my assumptions.

Edited by webdesigner93

Share this post


Link to post
Share on other sites

 

But i think some of the good things about bootstrap is you can do things like class="btn btn-sm btn-primary" to create a button etc.. as from what i'm understanding if i used your framework I would have to write the css to actually create a button instead of using classes that are already built in for this task. Is that correct? If that is indeed the case um why would i wanna write the css for my own buttons and use your framework then to just use bootstrap. Doesn't seem to time saving to me. But then again i've never used yours so I could be off base in my assumptions.

 

The problem is that button and many other elements in Bootstrap are cosmetically themed based on their designers decisions. Unless your design decisions match theirs you are going to be overriding and undoing styles which leads to an unmaintainable mess. You shouldn't be modifying a framework, you should only extend them (Open closed principal).

And in reality making a button is extremely straightforward. The difficult part of CSS - the architecture is what frameworks like Nebula and Grandstand abstract away leaving developers and designers to focus on the cosmetics.

 

I get what BrowserBugs says, that a lot of Bootstrap consumers claim they are front-end developers but can barely code their way out of a paper bag when it comes to CSS. Like JavaScript, CSS should be properly learnt by developers working on the UI. Bootstrap is convenient to these developers because they can have a UI out of the box but that comes with very real limitations as I've explained above.

IMO Bootstrap is useful when you just need a quick, presentable UI and you don't care about any branding or theming - spiking our some API or building an interface to a private API.

 

.btn {
  display: inline-block;
  padding: .5rem 2rem;
  border-radius: 3px;
  text-align: center;
  color: white;
  background-color: grey;
}

.btn--sm {
  padding: .25rem 1rem;
}

.btn--lg {
  padding: 1rem 4rem;
}

.btn--success {
  background-color: green;
}

.btn--error {
  background-color: red;
}

The button module above took literally a minute to write. Another benefit of Nebula and Grandstand is that they are built on ITCSS and BEM which when used properly allow a Sass/CSS architecture to scale to huge levels with multiple contributors without the typical maintenance issues.

 

Your initial timesaving doesn't account for the time wasted dealing with specificity issues down the line. This time is an investment.

 

Paul talks about TDD a lot on here and one thing that often comes up is that it takes time to write tests. Yes it does, but it also means that you have confidence that your code works, or the code that a contributor has issued a pull request for works. You might need to re-factor this code or add a new feature. With tests you can be sure that you have not broken anything - like through a side-effect. These are all investments in time that have been proven to save money and time in the long term.

When getting paid to write software you're not being paid to do it quickly, you are being paid to do it right.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

Though JavaScript does not need a server to run but still the frameworks of PHP like laravel and Magento 2 are responsive and easy to understand. You can also go with the Wordpress which is a PHP framework. In today's time, more than 30% websites are made using WordPress. So it is also a convenient option. Javascript is interesting as well, JQuery is a library of the Javascript which has a huge number of classes and very easy to code. The frameworks like Angular JS and node.js are in the discussion for quite a few time. It is stated that node.js is the most preferred language for the coding side of IOT.

Edited by ssraj

Share this post


Link to post
Share on other sites

PHP is definitely worth learning. I like JS, Angular, React etc. HOWEVER, try breaking a PHP application by turning JS off in the browser.

 

Yes, I know React can run server-side and all that but if it worked that well then I think we'd see Facebook doing that and they don't. I read over and over again that React is the way forwards and see lots of arguments for why it is awesome, but PHP still has it's advantages and I won't be turning my back on it any-time soon I don't think.

 

As Paul mentioned above, there's lots of rubbish PHP out there. There's also a lot of rubbish JS for much the same reasons really.

 

In summary, PHP is worth learning, properly. JS is good and you're also going to need it for the pretty stuff if nothing else. So learn both.

Share this post


Link to post
Share on other sites

PHP is definitely worth learning. I like JS, Angular, React etc. HOWEVER, try breaking a PHP application by turning JS off in the browser.

 

Yes, I know React can run server-side and all that but if it worked that well then I think we'd see Facebook doing that and they don't. I read over and over again that React is the way forwards and see lots of arguments for why it is awesome, but PHP still has it's advantages and I won't be turning my back on it any-time soon I don't think.

 

As Paul mentioned above, there's lots of rubbish PHP out there. There's also a lot of rubbish JS for much the same reasons really.

 

In summary, PHP is worth learning, properly. JS is good and you're also going to need it for the pretty stuff if nothing else. So learn both.

 

You can pair React with PHP, Facebook do this at the moment. React DOM is only really concerned with the frontend, the benefit of server-side rendering is for performance mainly, and SEO.

 

The reason why Facebook use PHP is historical, they had difficulties scaling it, at one point they converted PHP to C++ code or something, before creating a new re-implementation of PHP called Hack. Parts of the stack definitely run on Node, just like parts use Erlang, they use a language where it makes the most sense. If they started from scratch I have no idea what they would choose, I'm not even sure if they would go with Node.

 

I get what you're saying, PHP has come a long way, just like JS has, both have pros and cons. I like the modern PHP ecosystem, frameworks like Laravel are extremely powerful. Node seems to suit those that want more fine grained control over their architecture, whereas PHP is more convention over configuration. I think ultimately it comes down to preference, just work in what you enjoy the most, otherwise you'll always struggle to progress if you don't enjoy it.

Share this post


Link to post
Share on other sites

The reason why Facebook use PHP is historical, they had difficulties scaling it, at one point they converted PHP to C++ code or something, before creating a new re-implementation of PHP called Hack. Parts of the stack definitely run on Node, just like parts use Erlang, they use a language where it makes the most sense. If they started from scratch I have no idea what they would choose, I'm not even sure if they would go with Node.

I would imagine (Probably already well on their way already) they would use a microservice approach which would potentially involve many languages. I would suspect Node for handling a lot of the async stuff (That's what it is very good at) and others for more computationally heavy things (Python, Go etc)

 

I'm not sure there's much of a need for PHP in large greenfield projects as there's better options out there, but one important factor is the skillset of the team - PHP devs are definitely more plentiful and so easier to find and hire so thats a reason why PHP might still be used.

 

I think with the popularity of frameworks like WordPress it will still continue to be heavily for brochure type sites, it's pretty good at serving those.

 

I've recently completed the Wes Bos Node course and that highlights what can be done with Node, especially with the enormous amount of packages on NPM it's just a joy to work with.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

I've recently completed the Wes Bos Node course and that highlights what can be done with Node, especially with the enormous amount of packages on NPM it's just a joy to work with.

I haven't started it yet, what are your thoughts on it?

Share this post


Link to post
Share on other sites

I haven't started it yet, what are your thoughts on it?

 

I think it's a really good introduction to Mongo/Mongoose which I hadn't used before beyond the most trivial of instances. He makes good use of Async/Await for consuming promises. I like how he introduces MVC architecture.

 

He does the templating on the server-side though. I think the more modern way of doing this is to make the backend API just send JSON responses out rather than rendering templates. The front-end service itself can still render server side with React/Vue and just query the API to get the responses back.

 

But I felt like I've learnt a lot from doing this. I guess it depends how much prior Node / Express experience you already have, at least in terms of building a real application. Would be much better if he introduced some unit testing...

Share this post


Link to post
Share on other sites

I started on it but gave up half way through. It was ok to a point I thought, but I wasn't learning all that much so decided to stop. There still may be some sections I may go back to in the future, like the mongo side of things.

 

TBH I don't agree that PHP is such a bad choice. PHP has made lots of great improvements over the years, and it's perfectly possible to write excellent code that will scale nicely in PHP. It's still not a bad choice in my opinion, but I do generally prefer node these days, mostly because I've been using it a lot in work, and I've found that the general day to day experience is a pleasant one. Having said that, it's true that the JS world is kinda crazy these days - I agree with a lot of the comments about JS fatigue. My friend who mostly uses Ruby started a React project fairly recently, and in his words "Getting up and running nearly broke me". JS is by no means perfect and PHP remains a good option.

 

There does seem to be a lot of traction in the JS world these days though, so if I were learning from scratch I'd recommend JS more than PHP. Just be prepared to spend a lot of time learning - PHP is a lot easier to get up and running in my opinion, and it's also a much more stable language than JS these days I'd say.

Did you not introduce you mate to create-react-app? It's a great package for somebody who just wants to get a React dev environment up and running quickly.

 

BTW I wasn't saying PHP is a bad language. I just think when going with a microservice approach you pick the language most suited to that service. I can't think of any instances where PHP would be the best choice for a service. Only that your team might already be skilled in PHP, and in that case then it's definitely a viable option.

Share this post


Link to post
Share on other sites

Yeah, the issue with create-react-app though, while it's a great package, is that it does so much for you under the hood. For someone who wants to understand what's going on, it's all a bit much.

 

I do enjoy Node as you know, as well as React, but the learning curve for this stuff is certainly very high.

I agree it's high, but it is helping to solve some very difficult problems on the frontend, especially now with the complexity that consumers are becoming accustomed to.

To try and solve things like module bundling, transpilation, code splitting, client routing along with all the DOM stuff that React abstracts would be much, much harder to do manually. Redux helps solve shared state, especially over time. Relay looks to be solving shared state between the client and API but I've not really looked into that much. But it stands that these are really complex problems.

Frontend has also always been really hard to test, and I think React has helped massively there too.

 

I think that the fact a lot of these problems have only recently been solved or are in the process of being results in a lot of flux and change in best practices. I'm confident over the next few years or so things will slow down a bit as best practice emerge - although there's always gonna be innovation and flux when working with bleeding edge technologies.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

The JS ecosystem, is one of, if not the best out there IMO, but I can't help but think it will cause issues in a few years that we're not seeing now. A lot of the solutions and packages out there are still treated as side projects and have no guarantee of being around for the long term, a lot of amazing ideas and libraries are abandonware already after a year or so. It's great that now developers have so much choice when it comes to adding packages, you can choose your own method of auth, caching etc, but I think developers will find themselves ripping a lot of code out and having to replace it if they aren't careful. Micro Services are not a silver bullet, they require a lot of careful planning, otherwise you simply lose the benefit that the architecture provides.

 

I think this is why companies like Netflix and Facebook tend to write the essential parts themselves, and only use projects that have significant resources behind them, or proven long-term backing. React Router is an example that you don't typically see in communities like PHP and Ruby, the code has been totally re-written 4 times in 2 years. I'm not dissing RR, V4 is really nice to work with and a massive improvement, but I can sympathise with developers having the burden of upgrading a third time when they have other things to be doing. If you multiply this across potentially hundreds of packages it starts to become a nightmare to work on.

 

I can see why something like Laravel or Rails would appeal to developers for this reason, usually all of the essential parts of the app first-party, at a cost of having to do things 'the Rails away'. It's not like these solutions stagnate either, if the community is starting to do real-time work, the framework authors will work out a way of providing a first-party solution. It's a tradeoff like most things, but I definitely see why a consistent architecture, same method of writing code, same method of testing, and easier upgrade path would appeal to the masses. It's also a good solution for start-ups because you can spend more time on writing code than playing around with the architecture. Rails helped Twitter get to 250mil users (not well, though) before the Scala re-build, as well as helping other companies like Shopify and AirBNB get to where they are today. As far as I know, Node doesn't have a Rails-like framework with any major backing, which still makes Rails and PHP frameworks a fair option.

Share this post


Link to post
Share on other sites

Yeah, the issue with create-react-app though, while it's a great package, is that it does so much for you under the hood. For someone who wants to understand what's going on, it's all a bit much.

 

I do enjoy Node as you know, as well as React, but the learning curve for this stuff is certainly very high.

 

There's an issue on Github I saw recently where people weren't aware that CRA turns your code into a progressive web app automatically. Obviously this can introduce buggy behaviour and confusion, as well as apps being unknowingly cached indefinitely if you screw it up. I think I would prefer a name change to react-cli and have templates like vue-cli, where you can choose a build process for the type of app you're building https://github.com/vuejs/vue-cli. It seems like a nice approach.

Share this post


Link to post
Share on other sites

We've been doing the same at work, only consume projects with significant backing for live projects. We're in the process of open sourcing a React Timeline package https://github.com/JSainsburyPLC/react-timelines Still lots of work to do around documentation and producing a demo but we've been very careful not to have a large dependency tree. In fact we only have devDependencies and peerDependencies having manually built out various utilities and so on.

As for RR4 there's no real reason for consumers to upgrade from v3 as the RR team have pledge to continually support, develop and accept contributions for v3. But I still understand the pain developers have to go though - but this is kind of indicative of working at the bleeding edge in an area thats receiving a huge amount of innovation.

 

One just has to make smart decisions on what packages they consume on live projects - looking at gh-stars, contribution history, company backing. React is very safe to use for example as it's backed by Facebook and they have additional vested interest in that they actually consume it really heavily on their flagship application.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

He does the templating on the server-side though. I think the more modern way of doing this is to make the backend API just send JSON responses out rather than rendering templates. The front-end service itself can still render server side with React/Vue and just query the API to get the responses back.

I remember thinking the first thing I would do when it came to that section is to install something like Nunjucks instead of Pug. I can't stand the syntax Pug uses. Nunjucks is the same as Twig in PHP, which is used in Craft, so I don't have to learn anything new, and yeah I would probably prefer the API route anyway.

Share this post


Link to post
Share on other sites

I remember thinking the first thing I would do when it came to that section is to install something like Nunjucks instead of Pug. I can't stand the syntax Pug uses. Nunjucks is the same as Twig in PHP, which is used in Craft, so I don't have to learn anything new, and yeah I would probably prefer the API route anyway.

I didn't mind the Pug syntax too much but I just don't think the API should really be concerned with getting request and sending back the relevant data (JSON) and let the frontend deal with how that is represented.

 

That all said I've still learnt a lot from the course and I'll be doing it again to help cement that knowledge :)

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

I am a web developer with plenty of experience with PHP and knowledgeable on OO PHP. PHP is NOT a bad language, it is a bad language when it is done badly! People need to learn the fundamentals before even deciding to work with PHP, Good knowledge of how to use PHP effectively and correctly will go a long way.

Share this post


Link to post
Share on other sites

 

But i think some of the good things about bootstrap is you can do things like class="btn btn-sm btn-primary" to create a button etc.. as from what i'm understanding if i used your framework I would have to write the css to actually create a button instead of using classes that are already built in for this task. Is that correct? If that is indeed the case um why would i wanna write the css for my own buttons and use your framework then to just use bootstrap. Doesn't seem to time saving to me. But then again i've never used yours so I could be off base in my assumptions.

 

 

Bootstrap is a UI Kit. Nebula seems to be more of a utility base for your project. https://tailwindcss.com/ is similar too.

 

For clarity, not every project has be based upon Bootstrap. There are some projects where it's preferable to have no styling/assumptions made for you. Shock horror, CSS is still written! :)

Share this post


Link to post
Share on other sites

 

 

Bootstrap is a UI Kit. Nebula seems to be more of a utility base for your project. https://tailwindcss.com/ is similar too.

 

For clarity, not every project has be based upon Bootstrap. There are some projects where it's preferable to have no styling/assumptions made for you. Shock horror, CSS is still written! :)

 

This is one of the reasons I built Nebula UI https://nebulaui.github.io/nebula/

It offers multiple packages depending on your level of buy-in. If you just want a CSS architecture that is devoid of cosmetic design decisions then this would be a good starting point.

Share this post


Link to post
Share on other sites

 

This is one of the reasons I built Nebula UI https://nebulaui.github.io/nebula/

It offers multiple packages depending on your level of buy-in. If you just want a CSS architecture that is devoid of cosmetic design decisions then this would be a good starting point.

 

Nebula looks good. I really like Tailwind too. The only thing that puts me off Tailwind is the build process, using JavaScript / Npm. Would really prefer some well structured sass files.

 

It's kind of annoying that Twitter Bootstrap has become such a standard that everything is compared against it. People, it's possible to create a site without Bootstrap in 2017 :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By jwbjnwolf
      Hi, I've got a PHP array menu of all folders of a directory which is ordered using the "Arraysortdate" value in each page folder's Json file instead of the folder names. 
      I've basically got everything sorted now, just this one last thing that I realise I like to have.
      A previous/next page button on each page that takes the current page, matches it with the value in the all folders array, and links to the next/previous page in that array which is sorted like previously mentioned using the "Arraysortdate".
      My json files are structuted as follows:
      {  "Arraysortdate": "2018-07-16-1",  "Month": ["July 2018"],  "Category": [    "testcat1",    "testcat2" ] } Here is the PHP I'm using for grabbing all folders and ordering them using the Arraysortdate value for each:
      <?php // initial array containing the dirs $dirs = glob('*/posts/*', GLOB_ONLYDIR); // new array with date as key $dirinfo_arr = []; foreach ($dirs as $cdir) { // get post info from file $dirinfo_str = file_get_contents("$cdir/includes/post-info.json"); $dirinfo = json_decode($dirinfo_str, TRUE); // add current directory to the info array $dirinfo['dir'] = $cdir; // add current dir to new array where date is the key $dirinfo_arr[$dirinfo['Arraysortdate']] = $dirinfo; } // sort new array krsort($dirinfo_arr); ?> Using print_r to dump the array contents, this will return for an item with say the json data as above:
      Array ( [0] => 2018-07-16-1 [1] => Array ( [0] => July 2018 ) [2] => Array ( [0] => testcat1 [1] => testcat ) [3] => blog/posts/test-blog-post ) I use this after sorting the array to output as just the folder path for using in html:
      <?php // get current dir from new array foreach($dirinfo_arr as $key=>$dir) { $dirpath = $dir['dir']; ?>    <!--HTML such as-->    <a href="<?=$dirpath?>">text</a> <?php } ?>  
    • By Gee_suss
      Hello. I have a curious case of a missing footer. I needed to add a lot of text to a page so the page is very long. When I first started to develop the text the footer was still there but as more text was added the footer suddenly disappeared. I find this very strange and I would like the footer to come back.
      Here is the link. www.mala.co.uk/privacy
      If you have a look at the other pages you will see the footer I mention above. Any ideas?
      Many thanks in advance.


    • By milanrehor
      Hello, I should have a question. We develop our e-shop and try to link the instagram feeds with our site (create a gallery of images on a certain hashtag). Despite the instafeedjs (it's jS, but maybe another alternative will be needed - PHP, for example), it worked good just for a specific ID. The problem is that I need photos from the entire instagram, which are filtered to a certain hastag eg #KFC. Does anyone have experience with it? Does anyone know how to do it? Or does anyone have a link where the information needed to look for it?
      We do not use any CMS due to bad experience, not only in our group, but in general. We write everything from base (HTML, CSS, JS, etc.)
      Thank you very much in advance, any answer would help me.
      PS: Sry for my bad English :p :D
    • By Gee_suss
      I need to put a link in the footer and create a new privacy page for this website (www.mala.co.uk). The footer is in php and is pasted into the code of each page. What I have done is created a test server and I have copied all of the files via ftp to this new location so I can make the changes.
      What I have found is that the website does not display correctly and none of the CSS or PHP is showing. Even though all I have done is copy all the files from one place to another.
      I did not create the website and I am wondering if the previous developer has done something to stop it being amended or copied. I am somewhat a novice but though I would be able to make the simple changes.
      PLEASE HELP! Kind Regards...


    • By BrowserBugs
      Hi,
      A bit stumped really. I'm trying get get a live test for given urls, mainly the url you're currently on. I've the following which works, but never on the page you're viewing, it just hangs so I'm missing something for sure;
      <?php function pageReport($var) { $ch = curl_init($var); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_exec($ch); $arry = curl_getinfo($ch); curl_close($ch); return $arry; } $wdf = pageReport('https://www.webdesignerforum.co.uk/forum/95-server-side/'); print_r($wdf); // Works $other_page = pageReport('https://www.mydomain.co.uk/other-page.php'); print_r($other_page); // Works // However add the following and it goes squiffy... $this_page = pageReport('https://www.mydomain.co.uk/test.php'); // this is the page we're testing on print_r($this_page); ?> I'm sure it freaks due to some weird double connection on the current page? Any ideas around this?
      Cheers.
      Update: After much digging a few articles the best answer to what's happening; "Be aware that if you're issuing the CURL request to your own site, you're using the default session handler, and the page you're requesting via CURL uses the same session as the page that's generating the request, you'll run into a deadlock situation." stackoverflow.
      For me i'm still struggling, I've a cron approach I'm working on to generate for each page at set intervals and saving the array for inclusion; essentially running this page on it's own is fine for any urls on the site as it never tests self. It's a small site so not many to do, would rather a cleaner method if anyone has any ideas?
  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      58,433
    • Most Online
      4,970

    Newest Member
    f9ariel
    Joined
  • Forum Statistics

    • Total Topics
      65,747
    • Total Posts
      452,964
×