|
Hi, I am basically a software developer looking for a laravel based admin template with all the Advanced functionalities which can save my tons of hours of production so that i can develop my projects at a quicker pace,can anyone please suggest me regarding this?
|
|
|
|
|
|
Hi all,
It's a Nginx and PHP web project, When I run a php script as shell, there shows Access Denide!
X-Powered-By: PHP/7.0.9
Content-type: text/html; charset=UTF-8
Access Denied!
The php file is like this:
#!/usr/bin/php-cgi
<?php
require_once("config.php");
require_once("util.php");
...
..
.
file_put_contents($argv[1], CJSON::encode($obj));
?>
I have try to change all the php file as 777, and try to run like this:
./list.php /home/cache.json
/usr/bin/php list.phph /home/cache.json
Still can not work.
and then I try to make a new php script test.php:
#! /usr/local/php7/bin/php-cgi
<?php
echo "php test";
?>
and then run it:
/usr/local/php7/bin/php-cgi test.php
it works:
[root@localhost ~]# /usr/local/php7/bin/php-cgi test.php
X-Powered-By: PHP/7.0.9
Content-type: text/html; charset=UTF-8
php test
I don't now why, anyone can help? Thanks for advance.
|
|
|
|
|
I think your path to the output file may be wrong. The directory /home is a system directory that contains the user home directories, one for each user. The command ls -l /home will show you what it is and what permissions it has.
Try just:
./list.php cache.json
// or
./list.php ~/cache.json
|
|
|
|
|
hello all,
i am having this issue with trying to connect my php app to sql server and i have edited the php.ini with the required driver needed to the php version 5.5. Below is the error i get anytime i try to connect to the database, i will appreciate if anybody will help with this.
Database connection refused.
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )
"
|
|
|
|
|
What part of those instructions are you having a problem with?
|
|
|
|
|
I did the connection from the php using these lines of code "
$serverName = "(THAIWO)";
$connectionInfo = array("Database"=>"examples");
$conn = sqlsrv_connect($serverName,$connectionInfo);
if ($conn){
echo ("Database connection Successful.<br />") ;
}else
{
echo ("Database connection refused.<br />") ;
die(print_r(sqlsrv_errors(), true));
}
"
i did download for
php_pdo_sqlsrv_55_ts.dll
php_pdo_sqlsrv_55_nts.dll
php_sqlsrv_55_ts.dll ,
php_sqlsrv_55_nts.dll
with all these done and checking for solution in the MSDN libary where i used the PDO syntax for connecting to sql server using the function sqlsrv_connect, am still at lost for where am doing things wrong. I want to know why i am refused and the reason for asking for the ODBC driver when i have downloaded and enabled it.
|
|
|
|
|
taiwokaffo wrote: i did download for That's the plugin for PHP, not the ODBC-driver. Follow the link in the instructions, download it and install it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks all it now working i used this to connect to the sql server 2012
$serverName = "OurIPAddress";
$connectionInfo = array( "Database"=>"Thenameofourdatabase", "UID"=>"OurID", "PWD"=>"Ourpassword");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
|
|
|
|
|
Hy everyone ..... I have to select php final year project..... suggest me some unique ideas ...... what sort of application i choose?
|
|
|
|
|
How should we? We have no idea at what level you are, what you have learned, how many time you have to finish and so on...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Choose something that you understand, and is within the limits of your skills and experience.
|
|
|
|
|
where to find your framework...link me
|
|
|
|
|
|
Hello. I have a list of numbered folders. In each folder there is a lot of .jpg files. I get a list of all including image files from this directories with two glob functions dynamically. I store a list of directory paths and filenames into two separates arrays called $DIR[] and $files[].
<?php
$pathDIR = "dirname/";
$DIR = Array(
);
foreach (glob($pathDIR . '/[0-30]*', GLOB_ONLYDIR) as $dirname) {
$DIR[] = $dirname;
}
for($a = 0; $a < count($DIR); $a++) {
echo $DIR[$a];
}
$pathFILE = Array();
$files = Array();
for($b = 1; $b <= count($DIR); $b++) {
$pathFILE[$b] = "dirname/" . $b . "/";
foreach(glob($pathFILE[$b] . '*.jpg') as $filename) {
$files[] = $filename;
}
}
for($c = 1; $c <= count($files); $c++) {
echo $files[$c-1];
}
?>
I have tried to combine two arrays in one multidimensional array with:
array_push ($DIR, $file);
to display array values I've tried with a pair of loops:
for($d = 0; $d <= count($DIR); $d++) {
for($e = 0; $e <= count($DIR[$d]); $e++) {
echo $DIR[$d][$e];
}
}
unfortunately array values are not properly show. Also, a notice indicate undefined offset .
Thanks a lot for your help.
|
|
|
|
|
My proposition is to modify the code in the following way:
<?php
$pathDIR = "dirname/";
$DIR = Array(
);
foreach (glob($pathDIR . '/[0-30]*', GLOB_ONLYDIR) as $dirname) {
$DIR[] = $dirname;
}
for($a = 0; $a < count($DIR); $a++) {
echo $DIR[$a];
}
$pathFILE = Array();
$files = Array();
for($b = 1; $b <= count($DIR); $b++) {
$pathFILE[$b] = "dirname/" . $b . "/";
$files[$b] = Array();
foreach(glob($pathFILE[$b] . '*.jpg') as $filename) {
$files[$b][] = $filename;
}
}
for($d = 1; $d <= count($files); $d++) {
for($e = 0; $e <= count($files[$d]); $e++) {
echo $files[$d][$e];
}
echo "\r\n\r\n";
}
?>
remember you can display files simlper way:
var_dump($files);
|
|
|
|
|
hy everybody.
I have learn basics in PHP i want to stronger my Object Oriented Concepts In PHP.
Kindly guide me Tutorials .
And what project will be suitable for me to learn things quickly and smartly .... i.e e-commerce or else?? ?
thanks in advance
|
|
|
|
|
AFAIK, PHP is a server side scripting language.
If you want to move to Object Oriented programming, its better to try .net (C#) or Java.
You will get a lot of examples over the internet.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Welcome to 2004.
Quote from Wikipedia: On July 13, 2004, PHP 5 was released, [...] PHP 5 included new features such as improved support for object-oriented programming, ... and it's advanced a lot more since then.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
Object-oriented-ism is a concept, not a tool. Any platform can have it if they start following the rules of Object-oriented programming - Wikipedia[^].
Secondly, C# is not a pure object-oriented language either, it just uses the concepts.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Sorry dude but php is OOP
Kribo
|
|
|
|
|
Yeah I got a response long back. Thanks for confirming it again.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Did you try to Google? A simple Google for "oop in php" would have yielded the following,
Object Oriented Programming in PHP[^].
Quote: And what project will be suitable for me to learn things quickly and smartly .... i.e e-commerce or else?? ? I recommend build applications for your own use. Your own online notes keeping application, your online to-do list, etc. This gives a flexible time to learn and experiment.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
thanks ...its really helpful
|
|
|
|