Jump to content

Glese

Members
  • Posts

    166
  • Joined

  • Last visited

    Never

Everything posted by Glese

  1. When having different levels of directories, using relative paths will not work anymore, for example: controller - authentication File 1: include('../../model/header.php') model File 2: header.php view File 3. style.css The header.php file includes the css file with a relative path, but the problem is it includes it as follows: ../view/style.css When now the header.php file gets included into File 1 in the folder "authentication", then the css file will not be accessible anymore, for it to be accessible you would have to go two directories up. In this sense my question is, what would be the proper path structure for a folder structure with multiple levels? Should I rather use absolute paths, I am not so prone of absolute path. What if the folders changes a bit, or the domain changes, or the location changes?
  2. I want to start a new project, before I do so I would like to understand the MVC sorting system better, I do call it a sorting system because I mainly want to use it to sort my php files, I hope this is not the wrong approach.(?) I am simply asking to get a clarification, the way I understood MVC is, that you do put all your "business logic" into Model, for example: form_script.php While you do put your "input logic" into Controller, for example: form_form.php And you do put your "UI logic" into View, for example: article_about_my_travel.php Is this the right way to understand MVC, and after all the right way to use it with PHP ?
  3. This one for example: Notice: Constant DB_HOST already defined in C:\...\connectvars.php on line 2 Just for you notice, I do understand your suggestion of proper coding, though this is an older project and I am not so serious about solving the notices. Just out of curiosity what would be the sign for having the serious errors excluding notices? This one did not work for me: error_reportign = E_ALL ^ E_NOTICE And this one did not work for me as well: error_reporting = E_ALL & ~E_NOTICE
  4. I am asking out of curiosity, how does this problem usually get solved, when using a tag system to sort content, and users enter similar tags. For example: flower and flowers... which means the difference between singular and plural. Judging by other sites which are around, this problem is not solved at all, they simply let you add as many tags as you want and then rank the most used tags, it indeed is a solution, but seems more like a walk-around solution to me. Any ideas how somebody could approach to solve this one? EDIT: My suggestion would be an analysis function, which analyzes the entered tag and then suggests the user that similar tags have been already entered and perhaps he wants to choose one of those which have been already entered. This does work though with a high traffic websites what can happen is the following: php and php5 You can end up with two similar tags which are both widely used though have different meanings to the user base. This one could be solved by simply prohibiting similar tags with little additions or changes, and so to speak "forcing" the user to choose something which is already there. May be a way, though it can turn out as a bad solution as well.
  5. I did try your suggestion as follows, I hope I did it right: ; error_reporting ; Default Value: E_ALL & ~E_NOTICE ; Development Value: E_ALL | E_STRICT ; Production Value: E_ALL & ~E_DEPRECATED error_reporting = -1 And now the mysqli function does work, but also, I am still getting notices, and it seems as if I did not adjust error_reporting at all, which means as if it is like it was in the beginning.
  6. When restarting the Apache server I also get the error message: synatx error, unexpected '&' in .../php.ini on line 110. And line 110 is: Default Value: E_ALL & ~E_NOTICE EDIT: I am quite sure it has to do with the php.ini, I must be doing something wrong, because if I revert the error_reporting back to the default with the ; in the front, then the mysqli_connect function does work again. I only enabled the above error reporting to get rid of the notices.
  7. After I did enable the following error reporting: Default Value: E_ALL & ~E_NOTICE I am getting the error message described in the title of this thread. I do have the php_mysqli.dll extension enabled as well - AND the function used to work as is, before I changed the error reporting, thus the function actually should be defined, what could be another reason, that PHP thinks it is not a defined function?
  8. You are right about that, I did realize there is PHP and there is PHP, and if you can build Facebook with PHP then I can build everything which I am looking for to build. I do agree with everything you said, I should not blame what I have, because without PHP the options would be scarcer. Perhaps if I would learn using PHP properly with a framework together it would be a bit more of a pleasure to program.
  9. I used to develop in PHP and now am considering to give it a go again. You can say I am starting out "again", so a too difficult framework would not be a good fit. You can say I do need available knowledge on the framework, a framework with a community and knowledge available would be good. And I am interested in building platforms, similar to a blog and social media sites. Any ideas which framework would be a good fit in this case?
  10. My goal is to create fast and snappy websites which usually platform type of websites, I am talking about these modern ones with Ajax and jQuery, which quite dynamic and fast and snappy. I do not like that PHP is not so readable and the code becomes quickly cluttered, I do like a language which makes use of indentation. I did have a look at Django and Python, though I figured after 2 weeks out it is not for me, it is in my opinion mostly for people who have learned desktop application development and want to continue developing applications for the web, you usually do not really even use it to create blogs or similar. Any ideas which web programming language would become an option for me? Or should I rather stick to PHP?
  11. How are the experiences? I am myself having difficulties, especially to work with the command prompt and typing in command lines and working with libraries - I also found PHP a bit more straightforward.
  12. I have a README file which does not have a file extension, I can open it with notepad but at the same time the layout is broken and it is just one on going text. How can one open it properly with the layout together?
  13. The title describes the question. I have PHP installed, Apache, MySQL and also phpMyAdmin in the htdocs folder of Apache. I installed them separately and do not use a compilation package. I did try to create a php file with phpinfo, which works and showcases that PHP is installed properly, though when I access: localhost/phpmyadmin/setup/index.php The file becomes opened in the browser and does not get executed. Any ideas why?
  14. I'm trying to showcase the folder structure of a folder contained with jpg files on a simple PHP web document. I'm looking into an automatic system, so that every time I add another photo to the folder on the web server the ascend name becomes visible on the web document. Any suggestions? P.S.: I'm just starting out, thus the vague question.
  15. I'm looking for a PHP Blog script which is user friendly, as in easy to set up and to edit, with the most necessary functions, efficiently laid out. I would appreciate suggestions.
×
×
  • 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.